public interface SchedulerNG
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
, which will
be passed via setMainThreadExecutor(ComponentMainThreadExecutor)
.
void setMainThreadExecutor(ComponentMainThreadExecutor mainThreadExecutor)
void registerJobStatusListener(JobStatusListener jobStatusListener)
void startScheduling()
void suspend(Throwable cause)
void cancel()
CompletableFuture<Void> getTerminationFuture()
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 scheduleOrUpdateConsumers(ResultPartitionID partitionID)
ArchivedExecutionGraph 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)
Optional<OperatorBackPressureStats> requestOperatorBackPressureStats(JobVertexID jobVertexId) throws FlinkException
FlinkException
CompletableFuture<String> triggerSavepoint(@Nullable String targetDirectory, boolean cancelJob)
void acknowledgeCheckpoint(JobID jobID, ExecutionAttemptID executionAttemptID, long checkpointId, CheckpointMetrics checkpointMetrics, TaskStateSnapshot checkpointState)
void declineCheckpoint(DeclineCheckpoint decline)
CompletableFuture<String> stopWithSavepoint(String targetDirectory, boolean terminate)
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–2021 The Apache Software Foundation. All rights reserved.