|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cascading.flow.FlowProcess cascading.flow.hadoop.HadoopFlowProcess
public class HadoopFlowProcess
Class HadoopFlowProcess is an implemenation of FlowProcess
for Hadoop. Use this interfact to get direct
access to the Hadoop JobConf and Reporter interfaces.
Operation
s to
fail if they are executed on a system other than Hadoop.
FlowSession
,
JobConf
,
Reporter
Field Summary |
---|
Fields inherited from class cascading.flow.FlowProcess |
---|
NULL |
Constructor Summary | |
---|---|
HadoopFlowProcess(FlowSession flowSession,
JobConf jobConf,
boolean isMapper)
Constructor HadoopFlowProcess creates a new HadoopFlowProcess instance. |
Method Summary | |
---|---|
int |
getCurrentNumMappers()
|
int |
getCurrentNumReducers()
|
int |
getCurrentTaskNum()
Method getCurrentTaskNum returns the task number of this task. |
JobConf |
getJobConf()
Method getJobConf returns the jobConf of this HadoopFlowProcess object. |
Object |
getProperty(String key)
Method getProperty should be used to return configuration parameters from the underlying system. |
Reporter |
getReporter()
Method getReporter returns the reporter of this HadoopFlowProcess object. |
void |
increment(Enum counter,
int amount)
Method increment is used to increment a custom counter. |
void |
increment(String group,
String counter,
int amount)
Method increment is used to increment a custom counter. |
boolean |
isMapper()
Method isMapper returns true if this part of the FlowProcess is a MapReduce mapper. |
void |
keepAlive()
Method keepAlive notifies the system that the current process is still alive. |
TupleEntryIterator |
openTapForRead(Tap tap)
Method openTapForRead return a TupleIterator for the given Tap instance. |
TupleEntryCollector |
openTapForWrite(Tap tap)
Method openTapForWrite returns a (@link TupleCollector} for the given Tap instance. |
void |
setReporter(Reporter reporter)
Method setReporter sets the reporter of this HadoopFlowProcess object. |
void |
setStatus(String status)
Method setStatus is used to set the status of the current operation. |
Methods inherited from class cascading.flow.FlowProcess |
---|
getCurrentSession, setCurrentSession |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HadoopFlowProcess(FlowSession flowSession, JobConf jobConf, boolean isMapper)
flowSession
- of type FlowSessionjobConf
- of type JobConfMethod Detail |
---|
public JobConf getJobConf()
public boolean isMapper()
public int getCurrentNumMappers()
public int getCurrentNumReducers()
public int getCurrentTaskNum()
public void setReporter(Reporter reporter)
reporter
- the reporter of this HadoopFlowProcess object.public Reporter getReporter()
public Object getProperty(String key)
FlowProcess
getProperty
in class FlowProcess
key
- of type String
FlowProcess.getProperty(String)
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.
keepAlive
in class FlowProcess
FlowProcess.keepAlive()
public void increment(Enum counter, int amount)
FlowProcess
increment
in class FlowProcess
counter
- of type Enumamount
- of type intFlowProcess.increment(Enum, int)
public void increment(String group, String counter, int amount)
FlowProcess
increment
in class FlowProcess
group
- of type Stringcounter
- of type Stringamount
- of type intFlowProcess.increment(String, String, int)
public void setStatus(String status)
FlowProcess
setStatus
in class FlowProcess
status
- of type StringFlowProcess.setStatus(String)
public TupleEntryIterator openTapForRead(Tap tap) throws IOException
FlowProcess
TupleIterator
for the given Tap instance.
openTapForRead
in class FlowProcess
tap
- of type Tap
IOException
- when there is a failure opening the resourceFlowProcess.openTapForRead(Tap)
public TupleEntryCollector openTapForWrite(Tap tap) throws IOException
FlowProcess
openTapForWrite
in class FlowProcess
tap
- of type Tap
IOException
- when there is a failure opening the resourceFlowProcess.openTapForWrite(Tap)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |