|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cascading.flow.FlowProcess
public abstract class FlowProcess
FlowProcess implementations provide a call-back interface into the current computing system. Each
Operation
is given a reference to a particluar implemenation, allowing it
to get configuration properties, send a "keep alive" ping, or to set a counter value.
Flow
.
Thus, a call to increment(Enum, int)
may start incrementing from zero if the operation making the call
belongs to a subsquent 'job' or 'step' from any previous operations calling increment.
A FlowProcess is roughly a child of FlowSession
. FlowSession is roughly one to one with a particular Flow
.
And every FlowSession will have one or more FlowProcesses.
FlowSession
Field Summary | |
---|---|
static FlowProcess |
NULL
Field NULL is a noop implementation of FlowSession. |
Constructor Summary | |
---|---|
protected |
FlowProcess()
|
protected |
FlowProcess(FlowSession currentSession)
|
Method Summary | |
---|---|
FlowSession |
getCurrentSession()
Method getCurrentSession returns the currentSession of this FlowProcess object. |
abstract Object |
getProperty(String key)
Method getProperty should be used to return configuration parameters from the underlying system. |
abstract void |
increment(Enum counter,
int amount)
Method increment is used to increment a custom counter. |
abstract void |
increment(String group,
String counter,
int amount)
Method increment is used to increment a custom counter. |
abstract void |
keepAlive()
Method keepAlive notifies the system that the current process is still alive. |
abstract TupleEntryIterator |
openTapForRead(Tap tap)
Method openTapForRead return a TupleIterator for the given Tap instance. |
abstract TupleEntryCollector |
openTapForWrite(Tap tap)
Method openTapForWrite returns a (@link TupleCollector} for the given Tap instance. |
void |
setCurrentSession(FlowSession currentSession)
Method setCurrentSession sets the currentSession of this FlowProcess object. |
abstract void |
setStatus(String status)
Method setStatus is used to set the status of the current operation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static FlowProcess NULL
Constructor Detail |
---|
protected FlowProcess()
protected FlowProcess(FlowSession currentSession)
Method Detail |
---|
public FlowSession getCurrentSession()
public void setCurrentSession(FlowSession currentSession)
currentSession
- the currentSession of this FlowProcess object.public abstract Object getProperty(String key)
key
- of type String
public abstract void keepAlive()
Operation
takes some moments to complete. Each system is different, so calling
ping every few seconds to every minute or so would be best.
public abstract void increment(Enum counter, int amount)
counter
- of type Enumamount
- of type intpublic abstract void increment(String group, String counter, int amount)
group
- of type Stringcounter
- of type Stringamount
- of type intpublic abstract void setStatus(String status)
status
- of type Stringpublic abstract TupleEntryIterator openTapForRead(Tap tap) throws IOException
TupleIterator
for the given Tap instance.
tap
- of type Tap
IOException
- when there is a failure opening the resourcepublic abstract TupleEntryCollector openTapForWrite(Tap tap) throws IOException
tap
- of type Tap
IOException
- when there is a failure opening the resource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |