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> java.util.Map<java.lang.String,java.lang.String> |
diffConfigIntoMap(C defaultConfig,
C updatedConfig) |
JobConf |
getConfig() |
JobConf |
getConfigCopy() |
long |
getCounterValue(java.lang.Enum counter) |
long |
getCounterValue(java.lang.String group,
java.lang.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() |
java.lang.Object |
getProperty(java.lang.String key) |
java.util.Collection<java.lang.String> |
getPropertyKeys() |
Reporter |
getReporter() |
void |
increment(java.lang.Enum counter,
long amount) |
void |
increment(java.lang.String group,
java.lang.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,
java.util.Map<java.lang.String,java.lang.String> map) |
java.lang.Object |
newInstance(java.lang.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(java.lang.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 java.lang.Object getProperty(java.lang.String key)
getProperty
in class FlowProcess<JobConf>
public java.util.Collection<java.lang.String> getPropertyKeys()
getPropertyKeys
in class FlowProcess<JobConf>
public java.lang.Object newInstance(java.lang.String className)
newInstance
in class FlowProcess<JobConf>
public void keepAlive()
keepAlive
in class FlowProcess<JobConf>
public void increment(java.lang.Enum counter, long amount)
increment
in class FlowProcess<JobConf>
public void increment(java.lang.String group, java.lang.String counter, long amount)
increment
in class FlowProcess<JobConf>
public long getCounterValue(java.lang.Enum counter)
getCounterValue
in class FlowProcess<JobConf>
public long getCounterValue(java.lang.String group, java.lang.String counter)
getCounterValue
in class FlowProcess<JobConf>
public void setStatus(java.lang.String status)
setStatus
in class FlowProcess<JobConf>
public boolean isCounterStatusInitialized()
isCounterStatusInitialized
in class FlowProcess<JobConf>
public TupleEntryIterator openTapForRead(Tap tap) throws java.io.IOException
openTapForRead
in class FlowProcess<JobConf>
java.io.IOException
public TupleEntryCollector openTapForWrite(Tap tap) throws java.io.IOException
openTapForWrite
in class FlowProcess<JobConf>
java.io.IOException
public TupleEntryCollector openTrapForWrite(Tap trap) throws java.io.IOException
openTrapForWrite
in class FlowProcess<JobConf>
java.io.IOException
public TupleEntryCollector openSystemIntermediateForWrite() throws java.io.IOException
openSystemIntermediateForWrite
in class FlowProcess<JobConf>
java.io.IOException
public <C> C copyConfig(C config)
copyConfig
in class FlowProcess<JobConf>
public <C> java.util.Map<java.lang.String,java.lang.String> diffConfigIntoMap(C defaultConfig, C updatedConfig)
diffConfigIntoMap
in class FlowProcess<JobConf>
public JobConf mergeMapIntoConfig(JobConf defaultConfig, java.util.Map<java.lang.String,java.lang.String> map)
mergeMapIntoConfig
in class FlowProcess<JobConf>
Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.