T
- Type of the result collected from tasks.V
- Type of the result assembled and returned when all tasks where sampled.@NotThreadSafe protected abstract static class TaskStatsRequestCoordinator.PendingStatsRequest<T,V> extends Object
Has to be accessed in lock scope.
Modifier and Type | Field and Description |
---|---|
protected boolean |
isDiscarded |
protected Set<Set<ExecutionAttemptID>> |
pendingTasks
All tasks what did not yet return a result.
|
protected int |
requestId
ID of the sampling request to this coordinator.
|
protected CompletableFuture<V> |
resultFuture
The future with the final result.
|
protected long |
startTime
The time when the request is created.
|
protected Map<org.apache.flink.shaded.guava32.com.google.common.collect.ImmutableSet<ExecutionAttemptID>,T> |
statsResultByTaskGroup
Results returned by individual tasks and stored by the tasks'
ExecutionAttemptID . |
Modifier | Constructor and Description |
---|---|
protected |
PendingStatsRequest(int requestId,
Collection<? extends Set<ExecutionAttemptID>> tasksToCollect)
Creates new
TaskStatsRequestCoordinator.PendingStatsRequest . |
Modifier and Type | Method and Description |
---|---|
protected abstract V |
assembleCompleteStats(long endTime)
A method that is called when responses from all tasks were collected successfully.
|
protected void |
checkDiscarded() |
protected void |
collectTaskStats(org.apache.flink.shaded.guava32.com.google.common.collect.ImmutableSet<ExecutionAttemptID> executionId,
T taskStatsResult)
Collects result from one of the tasks.
|
protected void |
completePromiseAndDiscard() |
protected void |
discard(Throwable cause) |
CompletableFuture<V> |
getStatsFuture()
A Future, which will either complete successfully if all of the samples from individual
tasks are collected or exceptionally, if at least one of the task responses fails.
|
protected boolean |
isComplete() |
protected final int requestId
protected final long startTime
protected final Set<Set<ExecutionAttemptID>> pendingTasks
protected final Map<org.apache.flink.shaded.guava32.com.google.common.collect.ImmutableSet<ExecutionAttemptID>,T> statsResultByTaskGroup
ExecutionAttemptID
.protected final CompletableFuture<V> resultFuture
protected boolean isDiscarded
protected PendingStatsRequest(int requestId, Collection<? extends Set<ExecutionAttemptID>> tasksToCollect)
TaskStatsRequestCoordinator.PendingStatsRequest
.requestId
- ID of the request.tasksToCollect
- tasks from which the stats responses are expected.protected boolean isComplete()
protected void discard(Throwable cause)
protected void collectTaskStats(org.apache.flink.shaded.guava32.com.google.common.collect.ImmutableSet<ExecutionAttemptID> executionId, T taskStatsResult)
executionId
- ID of the Task.taskStatsResult
- Result of the stats sample from the Task.protected void checkDiscarded()
protected void completePromiseAndDiscard()
public CompletableFuture<V> getStatsFuture()
protected abstract V assembleCompleteStats(long endTime)
Map<ExecutionAttemptID, T> statsResultByTask
variable.endTime
- The time when the final sample was collected.CompletableFuture<V> getStatsFuture
methodCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.