@InterfaceAudience.Private @InterfaceStability.Unstable public abstract class TaskStatus extends Object implements org.apache.hadoop.io.Writable, Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
TaskStatus.Phase |
static class |
TaskStatus.State |
Constructor and Description |
---|
TaskStatus() |
TaskStatus(TaskAttemptID taskid,
float progress,
int numSlots,
TaskStatus.State runState,
String diagnosticInfo,
String stateString,
String taskTracker,
TaskStatus.Phase phase,
Counters counters) |
Modifier and Type | Method and Description |
---|---|
abstract void |
addFetchFailedMap(TaskAttemptID mapTaskId)
Add to the list of maps from which output-fetches failed.
|
Object |
clone() |
Counters |
getCounters()
Get task's counters.
|
String |
getDiagnosticInfo() |
List<TaskAttemptID> |
getFetchFailedMaps()
Get the list of maps from which output-fetches failed.
|
long |
getFinishTime()
Get task finish time.
|
boolean |
getIncludeAllCounters() |
abstract boolean |
getIsMap() |
long |
getMapFinishTime()
Get map phase finish time for the task.
|
protected int |
getMaxStringSize()
Testcases can override
getMaxStringSize() to control the max-size
of strings in TaskStatus . |
org.apache.hadoop.mapred.SortedRanges.Range |
getNextRecordRange()
Get the next record range which is going to be processed by Task.
|
int |
getNumSlots() |
long |
getOutputSize()
Returns the number of bytes of output from this map.
|
TaskStatus.Phase |
getPhase()
Get current phase of this task.
|
float |
getProgress() |
TaskStatus.State |
getRunState() |
long |
getShuffleFinishTime()
Get shuffle finish time for the task.
|
long |
getSortFinishTime()
Get sort finish time for the task,.
|
long |
getStartTime()
Get start time of the task.
|
String |
getStateString() |
TaskAttemptID |
getTaskID() |
String |
getTaskTracker() |
void |
readFields(DataInput in) |
void |
setCounters(Counters counters)
Set the task's counters.
|
void |
setDiagnosticInfo(String info) |
void |
setIncludeAllCounters(boolean send) |
void |
setNextRecordRange(org.apache.hadoop.mapred.SortedRanges.Range nextRecordRange)
Set the next record range which is going to be processed by Task.
|
void |
setPhase(TaskStatus.Phase phase)
Set current phase of this task.
|
void |
setProgress(float progress) |
void |
setRunState(TaskStatus.State runState) |
void |
setStateString(String stateString)
Set the state of the
TaskStatus . |
void |
setTaskTracker(String tracker) |
void |
write(DataOutput out) |
public TaskStatus()
public TaskStatus(TaskAttemptID taskid, float progress, int numSlots, TaskStatus.State runState, String diagnosticInfo, String stateString, String taskTracker, TaskStatus.Phase phase, Counters counters)
protected int getMaxStringSize()
getMaxStringSize()
to control the max-size
of strings in TaskStatus
. Note that the TaskStatus
is never
exposed to clients or users (i.e Map or Reduce) and hence users cannot
override this api to pass large strings in TaskStatus
.public TaskAttemptID getTaskID()
public abstract boolean getIsMap()
public int getNumSlots()
public float getProgress()
public void setProgress(float progress)
public TaskStatus.State getRunState()
public String getTaskTracker()
public void setTaskTracker(String tracker)
public void setRunState(TaskStatus.State runState)
public String getDiagnosticInfo()
public void setDiagnosticInfo(String info)
public String getStateString()
public void setStateString(String stateString)
TaskStatus
.public org.apache.hadoop.mapred.SortedRanges.Range getNextRecordRange()
public void setNextRecordRange(org.apache.hadoop.mapred.SortedRanges.Range nextRecordRange)
nextRecordRange
- public long getFinishTime()
public long getShuffleFinishTime()
public long getMapFinishTime()
public long getSortFinishTime()
public long getStartTime()
public TaskStatus.Phase getPhase()
public void setPhase(TaskStatus.Phase phase)
phase
- phase of this taskpublic boolean getIncludeAllCounters()
public void setIncludeAllCounters(boolean send)
public Counters getCounters()
public void setCounters(Counters counters)
counters
- public long getOutputSize()
public List<TaskAttemptID> getFetchFailedMaps()
public abstract void addFetchFailedMap(TaskAttemptID mapTaskId)
mapTaskId
- map from which fetch failedpublic void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
Copyright © 2020 Apache Software Foundation. All rights reserved.