public class HadoopFlowProcess extends FlowProcess<JobConf> implements MapRed
FlowProcess
for Hadoop. Use this interface to get direct
access to the Hadoop JobConf and Reporter interfaces.
Be warned that coupling to this implementation will cause custom Operation
s to
fail if they are executed on a system other than Hadoop.FlowSession
,
JobConf
,
Reporter
FlowProcess.NullFlowProcess
NULL
Constructor and Description |
---|
HadoopFlowProcess() |
HadoopFlowProcess(Configuration jobConf) |
HadoopFlowProcess(FlowSession flowSession,
JobConf jobConf) |
HadoopFlowProcess(FlowSession flowSession,
JobConf jobConf,
boolean isMapper)
Constructor HadoopFlowProcess creates a new HadoopFlowProcess instance.
|
HadoopFlowProcess(HadoopFlowProcess flowProcess,
JobConf jobConf) |
HadoopFlowProcess(JobConf jobConf) |
Modifier and Type | Method and Description |
---|---|
<C> C |
copyConfig(C config) |
FlowProcess |
copyWith(JobConf jobConf) |
<C> Map<String,String> |
diffConfigIntoMap(C defaultConfig,
C updatedConfig) |
JobConf |
getConfig() |
JobConf |
getConfigCopy() |
long |
getCounterValue(Enum counter) |
long |
getCounterValue(String group,
String counter) |
int |
getCurrentNumMappers() |
int |
getCurrentNumReducers() |
int |
getCurrentSliceNum()
Method getCurrentTaskNum returns the task number of this task.
|
JobConf |
getJobConf()
Method getJobConf returns the jobConf of this HadoopFlowProcess object.
|
int |
getNumProcessSlices() |
OutputCollector |
getOutputCollector() |
Object |
getProperty(String key) |
Collection<String> |
getPropertyKeys() |
Reporter |
getReporter() |
void |
increment(Enum counter,
long amount) |
void |
increment(String group,
String counter,
long amount) |
boolean |
isCounterStatusInitialized() |
boolean |
isMapper()
Method isMapper returns true if this part of the FlowProcess is a MapReduce mapper.
|
void |
keepAlive() |
JobConf |
mergeMapIntoConfig(JobConf defaultConfig,
Map<String,String> map) |
Object |
newInstance(String className) |
TupleEntryCollector |
openSystemIntermediateForWrite() |
TupleEntryIterator |
openTapForRead(Tap tap) |
TupleEntryCollector |
openTapForWrite(Tap tap) |
TupleEntryCollector |
openTrapForWrite(Tap trap) |
void |
setOutputCollector(OutputCollector outputCollector) |
void |
setReporter(Reporter reporter)
Method setReporter sets the reporter of this HadoopFlowProcess object.
|
void |
setStatus(String status) |
closeTrapCollectors, getBooleanProperty, getBooleanProperty, getCurrentSession, getID, getIntegerProperty, getIntegerProperty, getStringProperty, getStringProperty, getTrapCollectorFor, getTrapCollectors, setCurrentSession
public HadoopFlowProcess()
public HadoopFlowProcess(Configuration jobConf)
public HadoopFlowProcess(JobConf jobConf)
public HadoopFlowProcess(FlowSession flowSession, JobConf jobConf)
public HadoopFlowProcess(FlowSession flowSession, JobConf jobConf, boolean isMapper)
flowSession
- of type FlowSessionjobConf
- of type JobConfpublic HadoopFlowProcess(HadoopFlowProcess flowProcess, JobConf jobConf)
public FlowProcess copyWith(JobConf jobConf)
copyWith
in class FlowProcess<JobConf>
public JobConf getJobConf()
public JobConf getConfig()
getConfig
in class FlowProcess<JobConf>
public JobConf getConfigCopy()
getConfigCopy
in class FlowProcess<JobConf>
public boolean isMapper()
public int getCurrentNumMappers()
public int getCurrentNumReducers()
public int getCurrentSliceNum()
getCurrentSliceNum
in class FlowProcess<JobConf>
public int getNumProcessSlices()
getNumProcessSlices
in class FlowProcess<JobConf>
public void setReporter(Reporter reporter)
reporter
- the reporter of this HadoopFlowProcess object.public Reporter getReporter()
getReporter
in interface MapRed
public void setOutputCollector(OutputCollector outputCollector)
public OutputCollector getOutputCollector()
public Object getProperty(String key)
getProperty
in class FlowProcess<JobConf>
public Collection<String> getPropertyKeys()
getPropertyKeys
in class FlowProcess<JobConf>
public Object newInstance(String className)
newInstance
in class FlowProcess<JobConf>
public void keepAlive()
keepAlive
in class FlowProcess<JobConf>
public void increment(Enum counter, long amount)
increment
in class FlowProcess<JobConf>
public void increment(String group, String counter, long amount)
increment
in class FlowProcess<JobConf>
public long getCounterValue(Enum counter)
getCounterValue
in class FlowProcess<JobConf>
public long getCounterValue(String group, String counter)
getCounterValue
in class FlowProcess<JobConf>
public void setStatus(String status)
setStatus
in class FlowProcess<JobConf>
public boolean isCounterStatusInitialized()
isCounterStatusInitialized
in class FlowProcess<JobConf>
public TupleEntryIterator openTapForRead(Tap tap) throws IOException
openTapForRead
in class FlowProcess<JobConf>
IOException
public TupleEntryCollector openTapForWrite(Tap tap) throws IOException
openTapForWrite
in class FlowProcess<JobConf>
IOException
public TupleEntryCollector openTrapForWrite(Tap trap) throws IOException
openTrapForWrite
in class FlowProcess<JobConf>
IOException
public TupleEntryCollector openSystemIntermediateForWrite() throws IOException
openSystemIntermediateForWrite
in class FlowProcess<JobConf>
IOException
public <C> C copyConfig(C config)
copyConfig
in class FlowProcess<JobConf>
public <C> Map<String,String> diffConfigIntoMap(C defaultConfig, C updatedConfig)
diffConfigIntoMap
in class FlowProcess<JobConf>
public JobConf mergeMapIntoConfig(JobConf defaultConfig, Map<String,String> map)
mergeMapIntoConfig
in class FlowProcess<JobConf>
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.