public abstract class SchedulerBase extends Object implements SchedulerNG
SchedulerNG.| Modifier and Type | Field and Description |
|---|---|
protected ExecutionVertexVersioner |
executionVertexVersioner |
| Constructor and Description |
|---|
SchedulerBase(org.slf4j.Logger log,
JobGraph jobGraph,
BackPressureStatsTracker backPressureStatsTracker,
Executor ioExecutor,
org.apache.flink.configuration.Configuration jobMasterConfiguration,
SlotProvider slotProvider,
ScheduledExecutorService futureExecutor,
ClassLoader userCodeLoader,
CheckpointRecoveryFactory checkpointRecoveryFactory,
org.apache.flink.api.common.time.Time rpcTimeout,
RestartStrategyFactory restartStrategyFactory,
BlobWriter blobWriter,
JobManagerJobMetricGroup jobManagerJobMetricGroup,
org.apache.flink.api.common.time.Time slotRequestTimeout,
ShuffleMaster<?> shuffleMaster,
JobMasterPartitionTracker partitionTracker,
ExecutionVertexVersioner executionVertexVersioner,
boolean legacyScheduling) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleGlobalFailureprotected final ExecutionVertexVersioner executionVertexVersioner
public SchedulerBase(org.slf4j.Logger log,
JobGraph jobGraph,
BackPressureStatsTracker backPressureStatsTracker,
Executor ioExecutor,
org.apache.flink.configuration.Configuration jobMasterConfiguration,
SlotProvider slotProvider,
ScheduledExecutorService futureExecutor,
ClassLoader userCodeLoader,
CheckpointRecoveryFactory checkpointRecoveryFactory,
org.apache.flink.api.common.time.Time rpcTimeout,
RestartStrategyFactory restartStrategyFactory,
BlobWriter blobWriter,
JobManagerJobMetricGroup jobManagerJobMetricGroup,
org.apache.flink.api.common.time.Time slotRequestTimeout,
ShuffleMaster<?> shuffleMaster,
JobMasterPartitionTracker partitionTracker,
ExecutionVertexVersioner executionVertexVersioner,
boolean legacyScheduling)
throws Exception
Exception@Deprecated protected ExecutionGraph getExecutionGraph()
getSchedulingTopology()
getFailoverTopology()
getInputsLocationsRetriever()
getExecutionVertex(ExecutionVertexID)
getExecutionVertexId(ExecutionAttemptID)
getExecutionVertexIdOrThrow(ExecutionAttemptID)
LegacyScheduler requires direct access to the execution graph.protected void resetForNewExecutions(Collection<ExecutionVertexID> vertices)
protected void restoreState(Set<ExecutionVertexID> vertices) throws Exception
Exceptionprotected void transitionToScheduled(List<ExecutionVertexID> verticesToDeploy)
protected ComponentMainThreadExecutor getMainThreadExecutor()
protected void failJob(Throwable cause)
protected final FailoverTopology<?,?> getFailoverTopology()
protected final SchedulingTopology<?,?> getSchedulingTopology()
protected final ResultPartitionAvailabilityChecker getResultPartitionAvailabilityChecker()
protected final InputsLocationsRetriever getInputsLocationsRetriever()
protected final void prepareExecutionGraphForNgScheduling()
protected Optional<ExecutionVertexID> getExecutionVertexId(ExecutionAttemptID executionAttemptId)
protected ExecutionVertexID getExecutionVertexIdOrThrow(ExecutionAttemptID executionAttemptId)
protected ExecutionVertex getExecutionVertex(ExecutionVertexID executionVertexId)
protected JobGraph getJobGraph()
protected abstract long getNumberOfRestarts()
protected void transitionExecutionGraphState(org.apache.flink.api.common.JobStatus current,
org.apache.flink.api.common.JobStatus newState)
public void setMainThreadExecutor(ComponentMainThreadExecutor mainThreadExecutor)
setMainThreadExecutor in interface SchedulerNGpublic void registerJobStatusListener(JobStatusListener jobStatusListener)
registerJobStatusListener in interface SchedulerNGpublic final void startScheduling()
startScheduling in interface SchedulerNGprotected abstract void startSchedulingInternal()
public void suspend(Throwable cause)
suspend in interface SchedulerNGpublic void cancel()
cancel in interface SchedulerNGpublic CompletableFuture<Void> getTerminationFuture()
getTerminationFuture in interface SchedulerNGpublic final boolean updateTaskExecutionState(TaskExecutionState taskExecutionState)
updateTaskExecutionState in interface SchedulerNGprotected void updateTaskExecutionStateInternal(ExecutionVertexID executionVertexId, TaskExecutionState taskExecutionState)
public SerializedInputSplit requestNextInputSplit(JobVertexID vertexID, ExecutionAttemptID executionAttempt) throws IOException
requestNextInputSplit in interface SchedulerNGIOExceptionpublic ExecutionState requestPartitionState(IntermediateDataSetID intermediateResultId, ResultPartitionID resultPartitionId) throws PartitionProducerDisposedException
requestPartitionState in interface SchedulerNGPartitionProducerDisposedExceptionpublic final void scheduleOrUpdateConsumers(ResultPartitionID partitionId)
scheduleOrUpdateConsumers in interface SchedulerNGprotected void scheduleOrUpdateConsumersInternal(ExecutionVertexID producerVertexId, ResultPartitionID resultPartitionId)
public ArchivedExecutionGraph requestJob()
requestJob in interface SchedulerNGpublic org.apache.flink.api.common.JobStatus requestJobStatus()
requestJobStatus in interface SchedulerNGpublic JobDetails requestJobDetails()
requestJobDetails in interface SchedulerNGpublic KvStateLocation requestKvStateLocation(org.apache.flink.api.common.JobID jobId, String registrationName) throws UnknownKvStateLocation, FlinkJobNotFoundException
requestKvStateLocation in interface SchedulerNGUnknownKvStateLocationFlinkJobNotFoundExceptionpublic 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
notifyKvStateRegistered in interface SchedulerNGFlinkJobNotFoundExceptionpublic void notifyKvStateUnregistered(org.apache.flink.api.common.JobID jobId,
JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName)
throws FlinkJobNotFoundException
notifyKvStateUnregistered in interface SchedulerNGFlinkJobNotFoundExceptionpublic void updateAccumulators(AccumulatorSnapshot accumulatorSnapshot)
updateAccumulators in interface SchedulerNGpublic Optional<OperatorBackPressureStats> requestOperatorBackPressureStats(JobVertexID jobVertexId) throws org.apache.flink.util.FlinkException
requestOperatorBackPressureStats in interface SchedulerNGorg.apache.flink.util.FlinkExceptionpublic CompletableFuture<String> triggerSavepoint(String targetDirectory, boolean cancelJob)
triggerSavepoint in interface SchedulerNGpublic void acknowledgeCheckpoint(org.apache.flink.api.common.JobID jobID,
ExecutionAttemptID executionAttemptID,
long checkpointId,
CheckpointMetrics checkpointMetrics,
TaskStateSnapshot checkpointState)
acknowledgeCheckpoint in interface SchedulerNGpublic void declineCheckpoint(DeclineCheckpoint decline)
declineCheckpoint in interface SchedulerNGpublic CompletableFuture<String> stopWithSavepoint(String targetDirectory, boolean advanceToEndOfEventTime)
stopWithSavepoint in interface SchedulerNGCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.