public interface SchedulerNG
extends 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 |
handleGlobalFailure(Throwable cause) |
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 |
notifyPartitionDataAvailable(ResultPartitionID partitionID) |
void |
reportCheckpointMetrics(org.apache.flink.api.common.JobID jobID,
ExecutionAttemptID executionAttemptID,
long checkpointId,
CheckpointMetrics checkpointMetrics) |
ExecutionGraphInfo |
requestJob() |
JobDetails |
requestJobDetails() |
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) |
CompletableFuture<String> |
triggerSavepoint(String targetDirectory,
boolean cancelJob) |
void |
updateAccumulators(AccumulatorSnapshot accumulatorSnapshot) |
default boolean |
updateTaskExecutionState(TaskExecutionState taskExecutionState) |
boolean |
updateTaskExecutionState(TaskExecutionStateTransition taskExecutionState) |
void startScheduling()
void cancel()
CompletableFuture<org.apache.flink.api.common.JobStatus> getJobTerminationFuture()
void handleGlobalFailure(Throwable cause)
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
void notifyPartitionDataAvailable(ResultPartitionID partitionID)
ExecutionGraphInfo requestJob()
org.apache.flink.api.common.JobStatus requestJobStatus()
JobDetails requestJobDetails()
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
FlinkJobNotFoundException
void notifyKvStateUnregistered(org.apache.flink.api.common.JobID jobId, JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName) throws FlinkJobNotFoundException
FlinkJobNotFoundException
void updateAccumulators(AccumulatorSnapshot accumulatorSnapshot)
CompletableFuture<String> triggerSavepoint(@Nullable String targetDirectory, boolean cancelJob)
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)
CompletableFuture<String> stopWithSavepoint(String targetDirectory, boolean terminate)
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.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.