public interface SchedulerNG extends GlobalFailureHandler, AutoCloseableAsync
Instances are created via SchedulerNGFactory
, and receive a JobGraph
when
instantiated.
Implementations can expect that methods will not be invoked concurrently. In fact, all
invocations will originate from a thread in the ComponentMainThreadExecutor
.
handleGlobalFailure
close, closeAsync
void startScheduling()
void cancel()
CompletableFuture<JobStatus> getJobTerminationFuture()
default boolean updateTaskExecutionState(TaskExecutionState taskExecutionState)
boolean updateTaskExecutionState(TaskExecutionStateTransition taskExecutionState)
SerializedInputSplit requestNextInputSplit(JobVertexID vertexID, ExecutionAttemptID executionAttempt) throws IOException
IOException
ExecutionState requestPartitionState(IntermediateDataSetID intermediateResultId, ResultPartitionID resultPartitionId) throws PartitionProducerDisposedException
ExecutionGraphInfo requestJob()
JobStatus requestJobStatus()
JobDetails requestJobDetails()
KvStateLocation requestKvStateLocation(JobID jobId, String registrationName) throws UnknownKvStateLocation, FlinkJobNotFoundException
void notifyKvStateRegistered(JobID jobId, JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName, KvStateID kvStateId, InetSocketAddress kvStateServerAddress) throws FlinkJobNotFoundException
FlinkJobNotFoundException
void notifyKvStateUnregistered(JobID jobId, JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName) throws FlinkJobNotFoundException
FlinkJobNotFoundException
void updateAccumulators(AccumulatorSnapshot accumulatorSnapshot)
CompletableFuture<String> triggerSavepoint(@Nullable String targetDirectory, boolean cancelJob, SavepointFormatType formatType)
CompletableFuture<CompletedCheckpoint> triggerCheckpoint(CheckpointType checkpointType)
void acknowledgeCheckpoint(JobID jobID, ExecutionAttemptID executionAttemptID, long checkpointId, CheckpointMetrics checkpointMetrics, TaskStateSnapshot checkpointState)
void reportCheckpointMetrics(JobID jobID, ExecutionAttemptID executionAttemptID, long checkpointId, CheckpointMetrics checkpointMetrics)
void declineCheckpoint(DeclineCheckpoint decline)
CompletableFuture<String> stopWithSavepoint(String targetDirectory, boolean terminate, SavepointFormatType formatType)
void deliverOperatorEventToCoordinator(ExecutionAttemptID taskExecution, OperatorID operator, OperatorEvent evt) throws FlinkException
OperatorCoordinator
with the given OperatorID
.
Failure semantics: If the task manager sends an event for a non-running task or a non-existing operator coordinator, then respond with an exception to the call. If task and coordinator exist, then we assume that the call from the TaskManager was valid, and any bubbling exception needs to cause a job failure
FlinkException
- Thrown, if the task is not running or no operator/coordinator exists
for the given ID.CompletableFuture<CoordinationResponse> deliverCoordinationRequestToCoordinator(OperatorID operator, CoordinationRequest request) throws FlinkException
OperatorCoordinator
with the given OperatorID
and returns the coordinator's response.FlinkException
- Thrown, if the task is not running, or no operator/coordinator exists
for the given ID, or the coordinator cannot handle client events.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.