public static interface JobTable.Job
Accessing any methods after a job has been closed will throw an IllegalStateException
.
Modifier and Type | Method and Description |
---|---|
Optional<JobTable.Connection> |
asConnection()
Returns the associated
JobTable.Connection if the job is connected to a JobManager. |
void |
close()
Closes this job and removes it from the owning
JobTable . |
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.
|
JobID |
getJobId()
Returns the
JobID which is associated with this job. |
boolean |
isConnected()
Returns
true if the job is connected to a JobManager. |
boolean isConnected()
true
if the job is connected to a JobManager.true
if the job is connected to a JobManager, otherwise false
JobID getJobId()
JobID
which is associated with this job.Optional<JobTable.Connection> asConnection()
JobTable.Connection
if the job is connected to a JobManager.Optional
containing the associated JobTable.Connection
instance if the
job is connected to a leading JobManager, or an empty Optional
if the job is
not connectedJobTable.Connection connect(ResourceID resourceId, JobMasterGateway jobMasterGateway, TaskManagerActions taskManagerActions, CheckpointResponder checkpointResponder, GlobalAggregateManager aggregateManager, PartitionProducerStateChecker partitionStateChecker)
A job can only be connected iff Job#isConnected() == false
.
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 connectionJobTable.Connection
IllegalStateException
- if the job is already connectedvoid close()
JobTable
.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.