public class JobMaster extends RpcEndpoint<JobMasterGateway>
JobGraph
.
It offers the following methods as part of its rpc interface to interact with the JobMaster remotely:
updateTaskExecutionState(java.util.UUID, org.apache.flink.runtime.taskmanager.TaskExecutionState)
updates the task execution state for
given taskModifier and Type | Field and Description |
---|---|
static String |
ARCHIVE_NAME |
static String |
JOB_MANAGER_NAME
Default names for Flink's distributed components
|
log
Constructor and Description |
---|
JobMaster(RpcService rpcService,
ResourceID resourceId,
JobGraph jobGraph,
Configuration configuration,
HighAvailabilityServices highAvailabilityService,
HeartbeatServices heartbeatServices,
ScheduledExecutorService executor,
BlobLibraryCacheManager libraryCacheManager,
RestartStrategyFactory restartStrategyFactory,
Time rpcAskTimeout,
JobManagerMetricGroup jobManagerMetricGroup,
OnCompletionActions jobCompletionActions,
FatalErrorHandler errorHandler,
ClassLoader userCodeLoader) |
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeCheckpoint(JobID jobID,
ExecutionAttemptID executionAttemptID,
long checkpointId,
CheckpointMetrics checkpointMetrics,
SubtaskState checkpointState) |
void |
declineCheckpoint(JobID jobID,
ExecutionAttemptID executionAttemptID,
long checkpointID,
Throwable reason) |
void |
disconnectResourceManager(UUID jobManagerLeaderId,
UUID resourceManagerLeaderId,
Exception cause) |
void |
disconnectTaskManager(ResourceID resourceID,
Exception cause) |
void |
failSlot(ResourceID taskManagerId,
AllocationID allocationId,
UUID leaderId,
Exception cause) |
void |
heartbeatFromResourceManager(ResourceID resourceID) |
void |
heartbeatFromTaskManager(ResourceID resourceID) |
KvStateLocation |
lookupKvStateLocation(String registrationName) |
void |
notifyKvStateRegistered(JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName,
KvStateID kvStateId,
KvStateServerAddress kvStateServerAddress) |
void |
notifyKvStateUnregistered(JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName) |
Future<Iterable<SlotOffer>> |
offerSlots(ResourceID taskManagerId,
Iterable<SlotOffer> slots,
UUID leaderId) |
Future<RegistrationResponse> |
registerTaskManager(String taskManagerRpcAddress,
TaskManagerLocation taskManagerLocation,
UUID leaderId) |
ClassloadingProps |
requestClassloadingProps() |
SerializedInputSplit |
requestNextInputSplit(UUID leaderSessionID,
JobVertexID vertexID,
ExecutionAttemptID executionAttempt) |
ExecutionState |
requestPartitionState(UUID leaderSessionID,
IntermediateDataSetID intermediateResultId,
ResultPartitionID resultPartitionId) |
Acknowledge |
scheduleOrUpdateConsumers(UUID leaderSessionID,
ResultPartitionID partitionID) |
void |
shutDown()
Suspend the job and shutdown all other services including rpc.
|
void |
start()
Starts the rpc endpoint.
|
void |
start(UUID leaderSessionID)
Start the rpc service and begin to run the job.
|
void |
startJobExecution() |
void |
suspendExecution(Throwable cause)
Suspending job, all the running tasks will be cancelled, and communication with other components
will be disposed.
|
Acknowledge |
updateTaskExecutionState(UUID leaderSessionID,
TaskExecutionState taskExecutionState)
Updates the task execution state for a given task.
|
callAsync, getAddress, getEndpointId, getMainThreadExecutor, getRpcService, getSelf, getSelfGatewayType, getTerminationFuture, runAsync, scheduleRunAsync, scheduleRunAsync, validateRunsInMainThread
public static final String JOB_MANAGER_NAME
public static final String ARCHIVE_NAME
public JobMaster(RpcService rpcService, ResourceID resourceId, JobGraph jobGraph, Configuration configuration, HighAvailabilityServices highAvailabilityService, HeartbeatServices heartbeatServices, ScheduledExecutorService executor, BlobLibraryCacheManager libraryCacheManager, RestartStrategyFactory restartStrategyFactory, Time rpcAskTimeout, @Nullable JobManagerMetricGroup jobManagerMetricGroup, OnCompletionActions jobCompletionActions, FatalErrorHandler errorHandler, ClassLoader userCodeLoader) throws Exception
Exception
public void start()
RpcEndpoint
start
in class RpcEndpoint<JobMasterGateway>
public void start(UUID leaderSessionID) throws Exception
leaderSessionID
- The necessary leader id for running the job.Exception
public void shutDown() throws Exception
shutDown
in class RpcEndpoint<JobMasterGateway>
Exception
- indicating that the something went wrong while shutting the RPC endpoint downpublic void startJobExecution()
public void suspendExecution(Throwable cause)
Mostly job is suspended because of the leadership has been revoked, one can be restart this job by
calling the start(UUID)
method once we take the leadership back again.
cause
- The reason of why this job been suspended.public Acknowledge updateTaskExecutionState(UUID leaderSessionID, TaskExecutionState taskExecutionState) throws Exception
taskExecutionState
- New task execution state for a given taskException
public SerializedInputSplit requestNextInputSplit(UUID leaderSessionID, JobVertexID vertexID, ExecutionAttemptID executionAttempt) throws Exception
Exception
public ExecutionState requestPartitionState(UUID leaderSessionID, IntermediateDataSetID intermediateResultId, ResultPartitionID resultPartitionId) throws Exception
Exception
public Acknowledge scheduleOrUpdateConsumers(UUID leaderSessionID, ResultPartitionID partitionID) throws Exception
Exception
public void disconnectTaskManager(ResourceID resourceID, Exception cause)
public void acknowledgeCheckpoint(JobID jobID, ExecutionAttemptID executionAttemptID, long checkpointId, CheckpointMetrics checkpointMetrics, SubtaskState checkpointState) throws CheckpointException
CheckpointException
public void declineCheckpoint(JobID jobID, ExecutionAttemptID executionAttemptID, long checkpointID, Throwable reason)
public KvStateLocation lookupKvStateLocation(String registrationName) throws Exception
Exception
public void notifyKvStateRegistered(JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName, KvStateID kvStateId, KvStateServerAddress kvStateServerAddress)
public void notifyKvStateUnregistered(JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName)
public ClassloadingProps requestClassloadingProps() throws Exception
Exception
public Future<Iterable<SlotOffer>> offerSlots(ResourceID taskManagerId, Iterable<SlotOffer> slots, UUID leaderId) throws Exception
Exception
public void failSlot(ResourceID taskManagerId, AllocationID allocationId, UUID leaderId, Exception cause) throws Exception
Exception
public Future<RegistrationResponse> registerTaskManager(String taskManagerRpcAddress, TaskManagerLocation taskManagerLocation, UUID leaderId) throws Exception
Exception
public void disconnectResourceManager(UUID jobManagerLeaderId, UUID resourceManagerLeaderId, Exception cause) throws Exception
Exception
public void heartbeatFromTaskManager(ResourceID resourceID)
public void heartbeatFromResourceManager(ResourceID resourceID)
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.