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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<JobTable.Connection>
asConnection()
Returns the associatedJobTable.Connection
if the job is connected to a JobManager.void
close()
Closes this job and removes it from the owningJobTable
.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.org.apache.flink.api.common.JobID
getJobId()
Returns theJobID
which is associated with this job.boolean
isConnected()
Returnstrue
if the job is connected to a JobManager.
-
-
-
Method Detail
-
isConnected
boolean isConnected()
Returnstrue
if the job is connected to a JobManager.- Returns:
true
if the job is connected to a JobManager, otherwisefalse
-
getJobId
org.apache.flink.api.common.JobID getJobId()
Returns theJobID
which is associated with this job.- Returns:
- job id which is associated with this job
-
asConnection
Optional<JobTable.Connection> asConnection()
Returns the associatedJobTable.Connection
if the job is connected to a JobManager.- Returns:
- an
Optional
containing the associatedJobTable.Connection
instance if the job is connected to a leading JobManager, or an emptyOptional
if 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
.
-
-