|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cascading.flow.FlowProcess<Properties> cascading.flow.local.LocalFlowProcess
public class LocalFlowProcess
Class LocalFlowProcess is the local mode implementation of FlowProcess
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class cascading.flow.FlowProcess |
---|
FlowProcess.NullFlowProcess |
Field Summary |
---|
Fields inherited from class cascading.flow.FlowProcess |
---|
NULL |
Constructor Summary | |
---|---|
LocalFlowProcess()
|
|
LocalFlowProcess(FlowSession flowSession,
Properties config)
|
|
LocalFlowProcess(LocalFlowProcess flowProcess,
Properties properties)
|
|
LocalFlowProcess(Properties config)
|
Method Summary | |
---|---|
Properties |
copyConfig(Properties config)
|
FlowProcess |
copyWith(Properties object)
|
Map<String,String> |
diffConfigIntoMap(Properties defaultConfig,
Properties updatedConfig)
|
Properties |
getConfigCopy()
|
int |
getCurrentSliceNum()
Method getCurrentSliceNum returns an integer representing which slice instance currently running. |
int |
getNumProcessSlices()
Method getNumProcessSlices returns the number of parallel slices or tasks allocated for this process execution. |
Object |
getProperty(String key)
Method getProperty should be used to return configuration parameters from the underlying system. |
Collection<String> |
getPropertyKeys()
Method getPropertyKeys returns an immutable collection of all available property key values. |
void |
increment(Enum counter,
long amount)
Method increment is used to increment a custom counter. |
void |
increment(String group,
String counter,
long amount)
Method increment is used to increment a custom counter. |
boolean |
isCounterStatusInitialized()
Method isCounterStatusInitialized returns true if it is safe to increment a counter or set a status. |
void |
keepAlive()
Method keepAlive notifies the system that the current process is still alive. |
Properties |
mergeMapIntoConfig(Properties defaultConfig,
Map<String,String> map)
|
Object |
newInstance(String className)
Method newInstance creates a new object instance from the given className argument delegating to any platform specific instantiation and configuration routines. |
TupleEntryCollector |
openSystemIntermediateForWrite()
|
TupleEntryIterator |
openTapForRead(Tap tap)
Method openTapForRead return a TupleEntryIterator for the given Tap instance. |
TupleEntryCollector |
openTapForWrite(Tap tap)
Method openTapForWrite returns a (@link TupleCollector} for the given Tap instance. |
TupleEntryCollector |
openTrapForWrite(Tap trap)
Method openTrapForWrite returns a (@link TupleCollector} for the given Tap instance. |
void |
setStatus(String status)
Method setStatus is used to set the status of the current operation. |
void |
setStepStats(LocalStepStats stepStats)
|
Methods inherited from class cascading.flow.FlowProcess |
---|
getCurrentSession, getID, getIntegerProperty, getStringProperty, setCurrentSession |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalFlowProcess()
public LocalFlowProcess(Properties config)
public LocalFlowProcess(FlowSession flowSession, Properties config)
public LocalFlowProcess(LocalFlowProcess flowProcess, Properties properties)
Method Detail |
---|
public void setStepStats(LocalStepStats stepStats)
public int getNumProcessSlices()
FlowProcess
getNumProcessSlices
in class FlowProcess<Properties>
public int getCurrentSliceNum()
FlowProcess
0
(zero) is the first slice instance.
getCurrentSliceNum
in class FlowProcess<Properties>
public Object getProperty(String key)
FlowProcess
getProperty
in class FlowProcess<Properties>
key
- of type String
public Collection<String> getPropertyKeys()
FlowProcess
getPropertyKeys
in class FlowProcess<Properties>
public Object newInstance(String className)
FlowProcess
newInstance
in class FlowProcess<Properties>
public void keepAlive()
FlowProcess
Operation
takes some moments to complete. Each system is different, so calling
ping every few seconds to every minute or so would be best.
This method will fail silently if the underlying mechanism to notify keepAlive status are not initialized.
keepAlive
in class FlowProcess<Properties>
public void increment(Enum counter, long amount)
FlowProcess
FlowProcess.isCounterStatusInitialized()
.
increment
in class FlowProcess<Properties>
counter
- of type Enumamount
- of type intpublic void increment(String group, String counter, long amount)
FlowProcess
FlowProcess.isCounterStatusInitialized()
.
increment
in class FlowProcess<Properties>
group
- of type Stringcounter
- of type Stringamount
- of type intpublic void setStatus(String status)
FlowProcess
FlowProcess.isCounterStatusInitialized()
.
setStatus
in class FlowProcess<Properties>
status
- of type Stringpublic boolean isCounterStatusInitialized()
FlowProcess
isCounterStatusInitialized
in class FlowProcess<Properties>
public TupleEntryIterator openTapForRead(Tap tap) throws IOException
FlowProcess
TupleEntryIterator
for the given Tap instance.
Note the returned iterator will return the same instance of TupleEntry
on every call,
thus a copy must be made of either the TupleEntry or the underlying Tuple
instance if they are to be
stored in a Collection.
openTapForRead
in class FlowProcess<Properties>
tap
- of type Tap
IOException
- when there is a failure opening the resourcepublic TupleEntryCollector openTapForWrite(Tap tap) throws IOException
FlowProcess
openTapForWrite
in class FlowProcess<Properties>
tap
- of type Tap
IOException
- when there is a failure opening the resourcepublic TupleEntryCollector openTrapForWrite(Tap trap) throws IOException
FlowProcess
openTrapForWrite
in class FlowProcess<Properties>
trap
- of type Tap
IOException
- when there is a failure opening the resourcepublic TupleEntryCollector openSystemIntermediateForWrite() throws IOException
openSystemIntermediateForWrite
in class FlowProcess<Properties>
IOException
public FlowProcess copyWith(Properties object)
copyWith
in class FlowProcess<Properties>
public Properties getConfigCopy()
getConfigCopy
in class FlowProcess<Properties>
public Properties copyConfig(Properties config)
copyConfig
in class FlowProcess<Properties>
public Map<String,String> diffConfigIntoMap(Properties defaultConfig, Properties updatedConfig)
diffConfigIntoMap
in class FlowProcess<Properties>
public Properties mergeMapIntoConfig(Properties defaultConfig, Map<String,String> map)
mergeMapIntoConfig
in class FlowProcess<Properties>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |