Class DefaultJobTable
java.lang.Object
org.apache.flink.runtime.taskexecutor.DefaultJobTable
- All Implemented Interfaces:
AutoCloseable,JobTable
Default implementation of the
JobTable.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.runtime.taskexecutor.JobTable
JobTable.Connection, JobTable.Job, JobTable.JobServices -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static DefaultJobTablecreate()getConnection(org.apache.flink.api.common.JobID jobId) Gets the connection registered under jobId.getConnection(ResourceID resourceId) Gets the connection registered under resourceId.getJob(org.apache.flink.api.common.JobID jobId) Gets the job registered under jobId.getJobs()Gets all registered jobs.<E extends Exception>
JobTable.JobgetOrCreateJob(org.apache.flink.api.common.JobID jobId, org.apache.flink.util.function.SupplierWithException<? extends JobTable.JobServices, E> jobServicesSupplier) Gets a registeredJobTable.Jobor creates one if not present.booleanisEmpty()Returnstrueif the job table does not contain any jobs.
-
Method Details
-
getOrCreateJob
public <E extends Exception> JobTable.Job getOrCreateJob(org.apache.flink.api.common.JobID jobId, org.apache.flink.util.function.SupplierWithException<? extends JobTable.JobServices, E> jobServicesSupplier) throws EDescription copied from interface:JobTableGets a registeredJobTable.Jobor creates one if not present.- Specified by:
getOrCreateJobin interfaceJobTable- Parameters:
jobId- jobId identifies the job to getjobServicesSupplier- jobServicesSupplier create newJobTable.JobServicesif a new job needs to be created- Returns:
- the current job (existing or created) registered under jobId
- Throws:
E- if the job services could not be created
-
getJob
Description copied from interface:JobTableGets the job registered under jobId.- Specified by:
getJobin interfaceJobTable- Parameters:
jobId- jobId identifying the job to get- Returns:
- an
Optionalcontaining theJobTable.Jobregistered under jobId, or an emptyOptionalif no job has been registered
-
getConnection
Description copied from interface:JobTableGets the connection registered under jobId.- Specified by:
getConnectionin interfaceJobTable- Parameters:
jobId- jobId identifying the connection to get- Returns:
- an
Optionalcontaining theJobTable.Connectionregistered under jobId, or an emptyOptionalif no connection has been registered (this could also mean that a job which has not been connected exists)
-
getConnection
Description copied from interface:JobTableGets the connection registered under resourceId.- Specified by:
getConnectionin interfaceJobTable- Parameters:
resourceId- resourceId identifying the connection to get- Returns:
- an
Optionalcontaining theJobTable.Connectionregistered under resourceId, or an emptyOptionalif no connection has been registered
-
getJobs
Description copied from interface:JobTableGets all registered jobs. -
isEmpty
public boolean isEmpty()Description copied from interface:JobTableReturnstrueif the job table does not contain any jobs. -
create
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-