public class AdaptiveBatchScheduler extends DefaultScheduler
executionDeployer, executionSlotAllocator, failoverStrategy, log, schedulingStrategy, shuffleMasterexecutionVertexVersioner, inputsLocationsRetriever, jobInfo, jobManagerJobMetricGroup, operatorCoordinatorHandler, stateLocationRetriever| Constructor and Description |
|---|
AdaptiveBatchScheduler(org.slf4j.Logger log,
JobGraph jobGraph,
Executor ioExecutor,
org.apache.flink.configuration.Configuration jobMasterConfiguration,
Consumer<org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor> startUpAction,
org.apache.flink.util.concurrent.ScheduledExecutor delayExecutor,
ClassLoader userCodeLoader,
CheckpointsCleaner checkpointsCleaner,
CheckpointRecoveryFactory checkpointRecoveryFactory,
JobManagerJobMetricGroup jobManagerJobMetricGroup,
SchedulingStrategyFactory schedulingStrategyFactory,
FailoverStrategy.Factory failoverStrategyFactory,
RestartBackoffTimeStrategy restartBackoffTimeStrategy,
ExecutionOperations executionOperations,
ExecutionVertexVersioner executionVertexVersioner,
ExecutionSlotAllocatorFactory executionSlotAllocatorFactory,
long initializationTimestamp,
org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor mainThreadExecutor,
JobStatusListener jobStatusListener,
Collection<org.apache.flink.core.failure.FailureEnricher> failureEnrichers,
ExecutionGraphFactory executionGraphFactory,
ShuffleMaster<?> shuffleMaster,
org.apache.flink.api.common.time.Time rpcTimeout,
VertexParallelismAndInputInfosDecider vertexParallelismAndInputInfosDecider,
int defaultMaxParallelism,
BlocklistOperations blocklistOperations,
org.apache.flink.configuration.JobManagerOptions.HybridPartitionDataConsumeConstraint hybridPartitionDataConsumeConstraint,
Map<JobVertexID,ForwardGroup> forwardGroupsByJobVertexId,
BatchJobRecoveryHandler jobRecoveryHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
allocateSlotsAndDeploy(List<ExecutionVertexID> verticesToDeploy)
Allocate slots and deploy the vertex when slots are returned.
|
CompletableFuture<Void> |
closeAsync() |
List<CompletableFuture<Integer>> |
computeDynamicSourceParallelism() |
static VertexParallelismStore |
computeVertexParallelismStoreForDynamicGraph(Iterable<JobVertex> vertices,
int defaultMaxParallelism)
Compute the
VertexParallelismStore for all given vertices in a dynamic graph, which
will set defaults and ensure that the returned store contains valid parallelisms, with the
configured default max parallelism. |
protected MarkPartitionFinishedStrategy |
getMarkPartitionFinishedStrategy() |
protected void |
handleTaskFailure(Execution failedExecution,
Throwable error) |
void |
initializeVerticesIfPossible() |
protected void |
maybeRestartTasks(FailureHandlingResult failureHandlingResult)
Modifies the vertices which need to be restarted.
|
protected void |
onTaskFailed(Execution execution) |
protected void |
onTaskFinished(Execution execution,
IOMetrics ioMetrics) |
protected void |
resetForNewExecution(ExecutionVertexID executionVertexId) |
protected void |
resetForNewExecutions(Collection<ExecutionVertexID> vertices) |
protected void |
startSchedulingInternal() |
cancelAllPendingSlotRequestsForVertex, cancelAllPendingSlotRequestsInternal, cancelExecution, createFailureHandlingResultSnapshot, getNumberOfRestarts, handleGlobalFailure, notifyCoordinatorsAboutTaskFailure, recordTaskFailureacknowledgeCheckpoint, archiveFromFailureHandlingResult, archiveGlobalFailure, cancel, computeVertexParallelismStore, computeVertexParallelismStore, computeVertexParallelismStore, computeVertexParallelismStore, declineCheckpoint, deliverCoordinationRequestToCoordinator, deliverOperatorEventToCoordinator, failJob, getDefaultMaxParallelism, getExceptionHistory, getExecutionGraph, getExecutionJobVertex, getExecutionVertex, getJobGraph, getJobId, getJobTerminationFuture, getMainThreadExecutor, getResultPartitionAvailabilityChecker, getSchedulingTopology, notifyEndOfData, notifyKvStateRegistered, notifyKvStateUnregistered, registerJobMetrics, reportCheckpointMetrics, reportInitializationMetrics, requestCheckpointStats, requestJob, requestJobStatus, requestKvStateLocation, requestNextInputSplit, requestPartitionState, restoreState, setGlobalFailureCause, startCheckpointScheduler, startScheduling, stopCheckpointScheduler, stopWithSavepoint, transitionExecutionGraphState, transitionToRunning, transitionToScheduled, triggerCheckpoint, triggerSavepoint, updateAccumulators, updateTaskExecutionStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrequestJobResourceRequirements, updateJobResourceRequirements, updateTaskExecutionStatepublic AdaptiveBatchScheduler(org.slf4j.Logger log,
JobGraph jobGraph,
Executor ioExecutor,
org.apache.flink.configuration.Configuration jobMasterConfiguration,
Consumer<org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor> startUpAction,
org.apache.flink.util.concurrent.ScheduledExecutor delayExecutor,
ClassLoader userCodeLoader,
CheckpointsCleaner checkpointsCleaner,
CheckpointRecoveryFactory checkpointRecoveryFactory,
JobManagerJobMetricGroup jobManagerJobMetricGroup,
SchedulingStrategyFactory schedulingStrategyFactory,
FailoverStrategy.Factory failoverStrategyFactory,
RestartBackoffTimeStrategy restartBackoffTimeStrategy,
ExecutionOperations executionOperations,
ExecutionVertexVersioner executionVertexVersioner,
ExecutionSlotAllocatorFactory executionSlotAllocatorFactory,
long initializationTimestamp,
org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor mainThreadExecutor,
JobStatusListener jobStatusListener,
Collection<org.apache.flink.core.failure.FailureEnricher> failureEnrichers,
ExecutionGraphFactory executionGraphFactory,
ShuffleMaster<?> shuffleMaster,
org.apache.flink.api.common.time.Time rpcTimeout,
VertexParallelismAndInputInfosDecider vertexParallelismAndInputInfosDecider,
int defaultMaxParallelism,
BlocklistOperations blocklistOperations,
org.apache.flink.configuration.JobManagerOptions.HybridPartitionDataConsumeConstraint hybridPartitionDataConsumeConstraint,
Map<JobVertexID,ForwardGroup> forwardGroupsByJobVertexId,
BatchJobRecoveryHandler jobRecoveryHandler)
throws Exception
Exceptionprotected void startSchedulingInternal()
startSchedulingInternal in class DefaultSchedulerprotected void maybeRestartTasks(FailureHandlingResult failureHandlingResult)
maybeRestartTasks in class DefaultSchedulerprotected void resetForNewExecutions(Collection<ExecutionVertexID> vertices)
resetForNewExecutions in class SchedulerBasepublic CompletableFuture<Void> closeAsync()
closeAsync in interface org.apache.flink.util.AutoCloseableAsynccloseAsync in class SchedulerBaseprotected void onTaskFinished(Execution execution, IOMetrics ioMetrics)
onTaskFinished in class DefaultSchedulerprotected void onTaskFailed(Execution execution)
onTaskFailed in class DefaultSchedulerprotected void handleTaskFailure(Execution failedExecution, @Nullable Throwable error)
handleTaskFailure in class DefaultSchedulerpublic void allocateSlotsAndDeploy(List<ExecutionVertexID> verticesToDeploy)
SchedulerOperationsallocateSlotsAndDeploy in interface SchedulerOperationsallocateSlotsAndDeploy in class DefaultSchedulerverticesToDeploy - The execution vertices to deployprotected void resetForNewExecution(ExecutionVertexID executionVertexId)
resetForNewExecution in class SchedulerBaseprotected MarkPartitionFinishedStrategy getMarkPartitionFinishedStrategy()
getMarkPartitionFinishedStrategy in class SchedulerBasepublic List<CompletableFuture<Integer>> computeDynamicSourceParallelism()
@VisibleForTesting public void initializeVerticesIfPossible()
@VisibleForTesting public static VertexParallelismStore computeVertexParallelismStoreForDynamicGraph(Iterable<JobVertex> vertices, int defaultMaxParallelism)
VertexParallelismStore for all given vertices in a dynamic graph, which
will set defaults and ensure that the returned store contains valid parallelisms, with the
configured default max parallelism.vertices - the vertices to compute parallelism fordefaultMaxParallelism - the global default max parallelismCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.