public class SimpleExponentialTaskRuntimeEstimator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Set<Task> |
doneTasks |
protected Map<TezTaskAttemptID,Long> |
startTimes |
protected DataStatistics |
taskStatistics |
protected Vertex |
vertex |
| Constructor and Description |
|---|
SimpleExponentialTaskRuntimeEstimator() |
| Modifier and Type | Method and Description |
|---|---|
long |
attemptEnrolledTime(TezTaskAttemptID attemptID) |
void |
contextualize(org.apache.hadoop.conf.Configuration conf,
Vertex vertex) |
protected DataStatistics |
dataStatisticsForTask(TezTaskID taskID) |
void |
enrollAttempt(TezTaskAttemptID id,
long timestamp) |
long |
estimatedRuntime(TezTaskAttemptID id)
Estimate a task attempt's total runtime.
|
boolean |
hasStagnatedProgress(TezTaskAttemptID id,
long timeStamp)
Returns true if the estimator has no updates records for a threshold time
window.
|
long |
newAttemptEstimatedRuntime()
Estimates how long a new attempt on this task will take if we start
one now
|
long |
runtimeEstimateVariance(TezTaskAttemptID id)
Computes the width of the error band of our estimate of the task
runtime as returned by
TaskRuntimeEstimator.estimatedRuntime(TezTaskAttemptID) |
long |
thresholdRuntime(TezTaskID taskID)
Find a maximum reasonable execution wallclock time.
|
void |
updateAttempt(TezTaskAttemptID attemptID,
TaskAttemptState state,
long timestamp) |
protected Vertex vertex
protected final Map<TezTaskAttemptID,Long> startTimes
protected final DataStatistics taskStatistics
public SimpleExponentialTaskRuntimeEstimator()
public void contextualize(org.apache.hadoop.conf.Configuration conf,
Vertex vertex)
contextualize in interface TaskRuntimeEstimatorpublic long estimatedRuntime(TezTaskAttemptID id)
TaskRuntimeEstimatorid - the TezTaskAttemptID of the attempt we are asking about-1 if
we don't have enough information yet to produce an estimate.public long newAttemptEstimatedRuntime()
TaskRuntimeEstimatornewAttemptEstimatedRuntime in interface TaskRuntimeEstimator-1 if
we don't have enough information yet to produce an estimate.public boolean hasStagnatedProgress(TezTaskAttemptID id, long timeStamp)
TaskRuntimeEstimatorid - the TezTaskAttemptID of the attempt we are asking abouttimeStamp - the time of the report we compare withpublic long runtimeEstimateVariance(TezTaskAttemptID id)
TaskRuntimeEstimatorTaskRuntimeEstimator.estimatedRuntime(TezTaskAttemptID)id - the TezTaskAttemptID of the attempt we are asking about-1 if
we don't have enough information yet to produce an estimate.public void updateAttempt(TezTaskAttemptID attemptID, TaskAttemptState state, long timestamp)
updateAttempt in interface TaskRuntimeEstimatorpublic void enrollAttempt(TezTaskAttemptID id, long timestamp)
enrollAttempt in interface TaskRuntimeEstimatorpublic long attemptEnrolledTime(TezTaskAttemptID attemptID)
attemptEnrolledTime in interface TaskRuntimeEstimatorprotected DataStatistics dataStatisticsForTask(TezTaskID taskID)
public long thresholdRuntime(TezTaskID taskID)
TaskRuntimeEstimatorthresholdRuntime in interface TaskRuntimeEstimatortaskID - the TezTaskID of the task we are asking aboutCopyright © 2022 Apache Software Foundation. All rights reserved.