Interface JobTable.Job
- Enclosing interface:
- JobTable
public static interface JobTable.Job
A job contains services which are bound to the lifetime of a Flink job. Moreover, it can be
connected to a leading JobManager and then store further services which are bound to the
lifetime of the JobManager connection.
Accessing any methods after a job has been closed will throw an IllegalStateException.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the associatedJobTable.Connectionif the job is connected to a JobManager.voidclose()Closes this job and removes it from the owningJobTable.connect(ResourceID resourceId, JobMasterGateway jobMasterGateway, TaskManagerActions taskManagerActions, CheckpointResponder checkpointResponder, GlobalAggregateManager aggregateManager, PartitionProducerStateChecker partitionStateChecker) Connects the job to a JobManager and associates the provided services with this connection.org.apache.flink.api.common.JobIDgetJobId()Returns theJobIDwhich is associated with this job.booleanReturnstrueif the job is connected to a JobManager.
-
Method Details
-
isConnected
boolean isConnected()Returnstrueif the job is connected to a JobManager.- Returns:
trueif the job is connected to a JobManager, otherwisefalse
-
getJobId
org.apache.flink.api.common.JobID getJobId()Returns theJobIDwhich is associated with this job.- Returns:
- job id which is associated with this job
-
asConnection
Optional<JobTable.Connection> asConnection()Returns the associatedJobTable.Connectionif the job is connected to a JobManager.- Returns:
- an
Optionalcontaining the associatedJobTable.Connectioninstance if the job is connected to a leading JobManager, or an emptyOptionalif the job is not connected
-
connect
JobTable.Connection connect(ResourceID resourceId, JobMasterGateway jobMasterGateway, TaskManagerActions taskManagerActions, CheckpointResponder checkpointResponder, GlobalAggregateManager aggregateManager, PartitionProducerStateChecker partitionStateChecker) Connects the job to a JobManager and associates the provided services with this connection.A job can only be connected iff
Job#isConnected() == false.- Parameters:
resourceId- resourceId of the JobManager to connect tojobMasterGateway- jobMasterGateway of the JobManager to connect totaskManagerActions- taskManagerActions associated with this connectioncheckpointResponder- checkpointResponder associated with this connectionaggregateManager- aggregateManager associated with this connectionpartitionStateChecker- partitionStateChecker associated with this connection- Returns:
- the established
JobTable.Connection - Throws:
IllegalStateException- if the job is already connected
-
close
void close()Closes this job and removes it from the owningJobTable.
-