Interface JobTable.Job
-
- Enclosing interface:
- JobTable
public static interface JobTable.JobA 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<JobTable.Connection>asConnection()Returns the associatedJobTable.Connectionif the job is connected to a JobManager.voidclose()Closes this job and removes it from the owningJobTable.JobTable.Connectionconnect(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.booleanisConnected()Returnstrueif the job is connected to a JobManager.
-
-
-
Method Detail
-
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.
-
-