org.apache.tez.mapreduce.processor
Class MRTask
java.lang.Object
org.apache.tez.mapreduce.processor.MRTask
- Direct Known Subclasses:
- MapProcessor, ReduceProcessor
public abstract class MRTask
- extends Object
|
Constructor Summary |
MRTask(boolean isMap)
|
|
Method Summary |
protected static
<INKEY,INVALUE,OUTKEY,OUTVALUE>
org.apache.hadoop.mapreduce.Reducer.Context |
|
createReduceContext(org.apache.hadoop.mapreduce.Reducer<INKEY,INVALUE,OUTKEY,OUTVALUE> reducer,
org.apache.hadoop.conf.Configuration job,
org.apache.hadoop.mapred.TaskAttemptID taskId,
org.apache.tez.runtime.library.common.sort.impl.TezRawKeyValueIterator rIter,
org.apache.hadoop.mapreduce.Counter inputKeyCounter,
org.apache.hadoop.mapreduce.Counter inputValueCounter,
org.apache.hadoop.mapreduce.RecordWriter<OUTKEY,OUTVALUE> output,
org.apache.hadoop.mapreduce.OutputCommitter committer,
org.apache.hadoop.mapreduce.StatusReporter reporter,
org.apache.hadoop.io.RawComparator<INKEY> comparator,
Class<INKEY> keyClass,
Class<INVALUE> valueClass)
|
void |
done()
|
org.apache.hadoop.mapred.JobConf |
getConf()
|
org.apache.tez.common.counters.TezCounters |
getCounters()
|
static List<org.apache.hadoop.fs.FileSystem.Statistics> |
getFsStatistics(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf)
Gets a handle to the Statistics instance based on the scheme associated
with path. |
org.apache.hadoop.mapred.JobContext |
getJobContext()
|
MRTaskReporter |
getMRReporter()
|
String |
getOutputName()
|
TezTaskStatus.State |
getState()
|
org.apache.hadoop.mapreduce.TaskAttemptContext |
getTaskAttemptContext()
|
org.apache.hadoop.mapred.TaskAttemptID |
getTaskAttemptId()
|
org.apache.tez.runtime.api.TezProcessorContext |
getUmbilical()
|
void |
initialize(org.apache.tez.runtime.api.TezProcessorContext context)
|
void |
initTask(org.apache.tez.runtime.api.LogicalOutput output)
|
void |
localizeConfiguration(org.apache.hadoop.mapred.JobConf jobConf)
|
static String |
normalizeStatus(String status,
org.apache.hadoop.conf.Configuration conf)
|
void |
setConf(org.apache.hadoop.mapred.JobConf jobConf)
|
void |
setState(TezTaskStatus.State state)
|
void |
statusUpdate()
Send a status update to the task tracker |
void |
taskCleanup()
|
void |
waitBeforeCompletion(MRTaskReporter reporter)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
jobConf
protected org.apache.hadoop.mapred.JobConf jobConf
jobContext
protected org.apache.hadoop.mapred.JobContext jobContext
taskAttemptContext
protected org.apache.hadoop.mapred.TaskAttemptContext taskAttemptContext
committer
protected org.apache.hadoop.mapreduce.OutputCommitter committer
processorContext
protected org.apache.tez.runtime.api.TezProcessorContext processorContext
taskAttemptId
protected org.apache.hadoop.mapred.TaskAttemptID taskAttemptId
progress
protected org.apache.hadoop.util.Progress progress
jobTokenSecret
protected SecretKey jobTokenSecret
mrReporter
protected MRTaskReporter mrReporter
useNewApi
protected boolean useNewApi
MRTask
public MRTask(boolean isMap)
initialize
public void initialize(org.apache.tez.runtime.api.TezProcessorContext context)
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
getUmbilical
public org.apache.tez.runtime.api.TezProcessorContext getUmbilical()
initTask
public void initTask(org.apache.tez.runtime.api.LogicalOutput output)
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
getMRReporter
public MRTaskReporter getMRReporter()
setState
public void setState(TezTaskStatus.State state)
getState
public TezTaskStatus.State getState()
getCounters
public org.apache.tez.common.counters.TezCounters getCounters()
setConf
public void setConf(org.apache.hadoop.mapred.JobConf jobConf)
getConf
public org.apache.hadoop.mapred.JobConf getConf()
getFsStatistics
@InterfaceAudience.Private
public static List<org.apache.hadoop.fs.FileSystem.Statistics> getFsStatistics(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf)
throws IOException
- Gets a handle to the Statistics instance based on the scheme associated
with path.
- Parameters:
path - the path.conf - the configuration to extract the scheme from if not part of
the path.
- Returns:
- a Statistics instance, or null if none is found for the scheme.
- Throws:
IOException
getOutputName
@InterfaceAudience.Private
public String getOutputName()
waitBeforeCompletion
public void waitBeforeCompletion(MRTaskReporter reporter)
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
done
public void done()
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
statusUpdate
public void statusUpdate()
throws IOException,
InterruptedException
- Send a status update to the task tracker
- Throws:
IOException
InterruptedException
normalizeStatus
public static String normalizeStatus(String status,
org.apache.hadoop.conf.Configuration conf)
createReduceContext
protected static <INKEY,INVALUE,OUTKEY,OUTVALUE> org.apache.hadoop.mapreduce.Reducer.Context createReduceContext(org.apache.hadoop.mapreduce.Reducer<INKEY,INVALUE,OUTKEY,OUTVALUE> reducer,
org.apache.hadoop.conf.Configuration job,
org.apache.hadoop.mapred.TaskAttemptID taskId,
org.apache.tez.runtime.library.common.sort.impl.TezRawKeyValueIterator rIter,
org.apache.hadoop.mapreduce.Counter inputKeyCounter,
org.apache.hadoop.mapreduce.Counter inputValueCounter,
org.apache.hadoop.mapreduce.RecordWriter<OUTKEY,OUTVALUE> output,
org.apache.hadoop.mapreduce.OutputCommitter committer,
org.apache.hadoop.mapreduce.StatusReporter reporter,
org.apache.hadoop.io.RawComparator<INKEY> comparator,
Class<INKEY> keyClass,
Class<INVALUE> valueClass)
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
taskCleanup
public void taskCleanup()
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
localizeConfiguration
public void localizeConfiguration(org.apache.hadoop.mapred.JobConf jobConf)
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
getTaskAttemptContext
public org.apache.hadoop.mapreduce.TaskAttemptContext getTaskAttemptContext()
getJobContext
public org.apache.hadoop.mapred.JobContext getJobContext()
getTaskAttemptId
public org.apache.hadoop.mapred.TaskAttemptID getTaskAttemptId()
Copyright © 2014 Apache Software Foundation. All rights reserved.