public interface SchedulerNG extends GlobalFailureHandler, org.apache.flink.util.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.
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledgeCheckpoint(org.apache.flink.api.common.JobID jobID,
ExecutionAttemptID executionAttemptID,
long checkpointId,
CheckpointMetrics checkpointMetrics,
TaskStateSnapshot checkpointState) |
void |
cancel() |
void |
declineCheckpoint(DeclineCheckpoint decline) |
CompletableFuture<CoordinationResponse> |
deliverCoordinationRequestToCoordinator(OperatorID operator,
CoordinationRequest request)
Delivers a coordination request to the
OperatorCoordinator with the given OperatorID and returns the coordinator's response. |
void |
deliverOperatorEventToCoordinator(ExecutionAttemptID taskExecution,
OperatorID operator,
OperatorEvent evt)
Delivers the given OperatorEvent to the
OperatorCoordinator with the given OperatorID. |
CompletableFuture<org.apache.flink.api.common.JobStatus> |
getJobTerminationFuture() |
void |
notifyEndOfData(ExecutionAttemptID executionAttemptID)
Notifies that the task has reached the end of data.
|
void |
notifyKvStateRegistered(org.apache.flink.api.common.JobID jobId,
JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName,
org.apache.flink.queryablestate.KvStateID kvStateId,
InetSocketAddress kvStateServerAddress) |
void |
notifyKvStateUnregistered(org.apache.flink.api.common.JobID jobId,
JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName) |
void |
reportCheckpointMetrics(org.apache.flink.api.common.JobID jobID,
ExecutionAttemptID executionAttemptID,
long checkpointId,
CheckpointMetrics checkpointMetrics) |
void |
reportInitializationMetrics(org.apache.flink.api.common.JobID jobId,
SubTaskInitializationMetrics initializationMetrics) |
CheckpointStatsSnapshot |
requestCheckpointStats()
Returns the checkpoint statistics for a given job.
|
ExecutionGraphInfo |
requestJob() |
default JobResourceRequirements |
requestJobResourceRequirements()
Read current
job resource requirements. |
org.apache.flink.api.common.JobStatus |
requestJobStatus() |
KvStateLocation |
requestKvStateLocation(org.apache.flink.api.common.JobID jobId,
String registrationName) |
SerializedInputSplit |
requestNextInputSplit(JobVertexID vertexID,
ExecutionAttemptID executionAttempt) |
ExecutionState |
requestPartitionState(IntermediateDataSetID intermediateResultId,
ResultPartitionID resultPartitionId) |
void |
startScheduling() |
CompletableFuture<String> |
stopWithSavepoint(String targetDirectory,
boolean terminate,
org.apache.flink.core.execution.SavepointFormatType formatType) |
CompletableFuture<CompletedCheckpoint> |
triggerCheckpoint(org.apache.flink.core.execution.CheckpointType checkpointType) |
CompletableFuture<String> |
triggerSavepoint(String targetDirectory,
boolean cancelJob,
org.apache.flink.core.execution.SavepointFormatType formatType) |
void |
updateAccumulators(AccumulatorSnapshot accumulatorSnapshot) |
default void |
updateJobResourceRequirements(JobResourceRequirements jobResourceRequirements)
Update
job resource requirements. |
default boolean |
updateTaskExecutionState(TaskExecutionState taskExecutionState) |
boolean |
updateTaskExecutionState(TaskExecutionStateTransition taskExecutionState) |
handleGlobalFailurevoid startScheduling()
void cancel()
CompletableFuture<org.apache.flink.api.common.JobStatus> getJobTerminationFuture()
default boolean updateTaskExecutionState(TaskExecutionState taskExecutionState)
boolean updateTaskExecutionState(TaskExecutionStateTransition taskExecutionState)
SerializedInputSplit requestNextInputSplit(JobVertexID vertexID, ExecutionAttemptID executionAttempt) throws IOException
IOExceptionExecutionState requestPartitionState(IntermediateDataSetID intermediateResultId, ResultPartitionID resultPartitionId) throws PartitionProducerDisposedException
ExecutionGraphInfo requestJob()
CheckpointStatsSnapshot requestCheckpointStats()
CheckpointStatsSnapshot is included in the ExecutionGraphInfo, this method is
preferred to requestJob() because it is less expensive.org.apache.flink.api.common.JobStatus requestJobStatus()
KvStateLocation requestKvStateLocation(org.apache.flink.api.common.JobID jobId, String registrationName) throws UnknownKvStateLocation, FlinkJobNotFoundException
void notifyKvStateRegistered(org.apache.flink.api.common.JobID jobId,
JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName,
org.apache.flink.queryablestate.KvStateID kvStateId,
InetSocketAddress kvStateServerAddress)
throws FlinkJobNotFoundException
FlinkJobNotFoundExceptionvoid notifyKvStateUnregistered(org.apache.flink.api.common.JobID jobId,
JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName)
throws FlinkJobNotFoundException
FlinkJobNotFoundExceptionvoid updateAccumulators(AccumulatorSnapshot accumulatorSnapshot)
CompletableFuture<String> triggerSavepoint(@Nullable String targetDirectory, boolean cancelJob, org.apache.flink.core.execution.SavepointFormatType formatType)
CompletableFuture<CompletedCheckpoint> triggerCheckpoint(org.apache.flink.core.execution.CheckpointType checkpointType)
void acknowledgeCheckpoint(org.apache.flink.api.common.JobID jobID,
ExecutionAttemptID executionAttemptID,
long checkpointId,
CheckpointMetrics checkpointMetrics,
TaskStateSnapshot checkpointState)
void reportCheckpointMetrics(org.apache.flink.api.common.JobID jobID,
ExecutionAttemptID executionAttemptID,
long checkpointId,
CheckpointMetrics checkpointMetrics)
void declineCheckpoint(DeclineCheckpoint decline)
void reportInitializationMetrics(org.apache.flink.api.common.JobID jobId,
SubTaskInitializationMetrics initializationMetrics)
CompletableFuture<String> stopWithSavepoint(String targetDirectory, boolean terminate, org.apache.flink.core.execution.SavepointFormatType formatType)
void deliverOperatorEventToCoordinator(ExecutionAttemptID taskExecution, OperatorID operator, OperatorEvent evt) throws org.apache.flink.util.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
org.apache.flink.util.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 org.apache.flink.util.FlinkException
OperatorCoordinator with the given OperatorID and returns the coordinator's response.org.apache.flink.util.FlinkException - Thrown, if the task is not running, or no operator/coordinator exists
for the given ID, or the coordinator cannot handle client events.void notifyEndOfData(ExecutionAttemptID executionAttemptID)
executionAttemptID - The execution attempt id.default JobResourceRequirements requestJobResourceRequirements()
job resource requirements.default void updateJobResourceRequirements(JobResourceRequirements jobResourceRequirements)
job resource requirements.jobResourceRequirements - new resource requirementsCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.