public abstract class TaskImpl extends Object implements Task, EventHandler<TaskEvent>
Modifier and Type | Field and Description |
---|---|
protected AppContext |
appContext |
protected Clock |
clock |
protected JobConf |
conf |
protected Credentials |
credentials |
protected boolean |
encryptedShuffle |
protected EventHandler |
eventHandler |
protected Path |
jobFile |
protected Token<JobTokenIdentifier> |
jobToken |
protected int |
nextAttemptNumber |
protected int |
partition |
protected TaskAttemptListener |
taskAttemptListener |
Constructor and Description |
---|
TaskImpl(JobId jobId,
TaskType taskType,
int partition,
EventHandler eventHandler,
Path remoteJobConfFile,
JobConf conf,
TaskAttemptListener taskAttemptListener,
Token<JobTokenIdentifier> jobToken,
Credentials credentials,
Clock clock,
int appAttemptId,
MRAppMetrics metrics,
AppContext appContext) |
Modifier and Type | Method and Description |
---|---|
boolean |
canCommit(TaskAttemptId taskAttemptID)
Can the output of the taskAttempt be committed.
|
protected abstract TaskAttemptImpl |
createAttempt() |
TaskAttempt |
getAttempt(TaskAttemptId attemptID) |
Map<TaskAttemptId,TaskAttempt> |
getAttempts() |
Counters |
getCounters() |
TaskId |
getID() |
TaskStateInternal |
getInternalState() |
protected abstract int |
getMaxAttempts() |
float |
getProgress() |
TaskReport |
getReport() |
protected String |
getSplitsAsString() |
TaskState |
getState() |
protected TaskAttempt |
getSuccessfulAttempt() |
void |
handle(TaskEvent event) |
protected void |
internalError(TaskEventType type) |
boolean |
isFinished()
Has Task reached the final state or not.
|
protected final JobConf conf
protected final Path jobFile
protected final int partition
protected final TaskAttemptListener taskAttemptListener
protected final EventHandler eventHandler
protected final Clock clock
protected final AppContext appContext
protected boolean encryptedShuffle
protected Credentials credentials
protected Token<JobTokenIdentifier> jobToken
protected int nextAttemptNumber
public TaskImpl(JobId jobId, TaskType taskType, int partition, EventHandler eventHandler, Path remoteJobConfFile, JobConf conf, TaskAttemptListener taskAttemptListener, Token<JobTokenIdentifier> jobToken, Credentials credentials, Clock clock, int appAttemptId, MRAppMetrics metrics, AppContext appContext)
public Map<TaskAttemptId,TaskAttempt> getAttempts()
getAttempts
in interface Task
public TaskAttempt getAttempt(TaskAttemptId attemptID)
getAttempt
in interface Task
public boolean isFinished()
Task
isFinished
in interface Task
public TaskReport getReport()
public Counters getCounters()
getCounters
in interface Task
public float getProgress()
getProgress
in interface Task
public TaskStateInternal getInternalState()
public boolean canCommit(TaskAttemptId taskAttemptID)
Task
protected abstract TaskAttemptImpl createAttempt()
protected abstract int getMaxAttempts()
protected TaskAttempt getSuccessfulAttempt()
public void handle(TaskEvent event)
handle
in interface EventHandler<TaskEvent>
protected void internalError(TaskEventType type)
protected String getSplitsAsString()
Copyright © 2013 Apache Software Foundation. All rights reserved.