public class LegacyTaskRuntimeEstimator extends Object
Modifier and Type | Field and Description |
---|---|
protected AppContext |
context |
protected Set<Task> |
doneTasks |
protected Map<Job,DataStatistics> |
mapperStatistics |
protected Map<Job,DataStatistics> |
reducerStatistics |
protected Map<TaskAttemptId,Long> |
startTimes |
Constructor and Description |
---|
LegacyTaskRuntimeEstimator() |
Modifier and Type | Method and Description |
---|---|
long |
attemptEnrolledTime(TaskAttemptId attemptID) |
void |
contextualize(Configuration conf,
AppContext context) |
protected DataStatistics |
dataStatisticsForTask(TaskId taskID) |
void |
enrollAttempt(TaskAttemptStatusUpdateEvent.TaskAttemptStatus status,
long timestamp) |
long |
estimatedNewAttemptRuntime(TaskId id)
Estimates how long a new attempt on this task will take if we start
one now
|
long |
estimatedRuntime(TaskAttemptId attemptID)
Estimate a task attempt's total runtime.
|
long |
runtimeEstimateVariance(TaskAttemptId attemptID)
Computes the width of the error band of our estimate of the task
runtime as returned by
TaskRuntimeEstimator.estimatedRuntime(TaskAttemptId) |
long |
thresholdRuntime(TaskId taskID)
Find a maximum reasonable execution wallclock time.
|
void |
updateAttempt(TaskAttemptStatusUpdateEvent.TaskAttemptStatus status,
long timestamp) |
protected AppContext context
protected final Map<TaskAttemptId,Long> startTimes
protected final Map<Job,DataStatistics> mapperStatistics
protected final Map<Job,DataStatistics> reducerStatistics
public void updateAttempt(TaskAttemptStatusUpdateEvent.TaskAttemptStatus status, long timestamp)
updateAttempt
in interface TaskRuntimeEstimator
public long estimatedRuntime(TaskAttemptId attemptID)
TaskRuntimeEstimator
attemptID
- the TaskAttemptId
of the attempt we are asking about-1
if
we don't have enough information yet to produce an estimate.public long runtimeEstimateVariance(TaskAttemptId attemptID)
TaskRuntimeEstimator
TaskRuntimeEstimator.estimatedRuntime(TaskAttemptId)
attemptID
- the TaskAttemptId
of the attempt we are asking about-1
if
we don't have enough information yet to produce an estimate.public void enrollAttempt(TaskAttemptStatusUpdateEvent.TaskAttemptStatus status, long timestamp)
enrollAttempt
in interface TaskRuntimeEstimator
public long attemptEnrolledTime(TaskAttemptId attemptID)
attemptEnrolledTime
in interface TaskRuntimeEstimator
public void contextualize(Configuration conf, AppContext context)
contextualize
in interface TaskRuntimeEstimator
protected DataStatistics dataStatisticsForTask(TaskId taskID)
public long thresholdRuntime(TaskId taskID)
TaskRuntimeEstimator
thresholdRuntime
in interface TaskRuntimeEstimator
taskID
- the TaskId
of the task we are asking aboutpublic long estimatedNewAttemptRuntime(TaskId id)
TaskRuntimeEstimator
estimatedNewAttemptRuntime
in interface TaskRuntimeEstimator
id
- the TaskId
of the task we are asking about-1
if
we don't have enough information yet to produce an estimate.Copyright © 2013 Apache Software Foundation. All rights reserved.