public class DefaultJobGraphStore<R extends ResourceVersion<R>> extends Object implements JobGraphStore, JobGraphStore.JobGraphListener
JobGraphStore
. Combined with different StateHandleStore
, we could persist the job graphs to various distributed storage. Also combined
with different JobGraphStoreWatcher
, we could get all the changes on the job graph store
and do the response.JobGraphStore.JobGraphListener
构造器和说明 |
---|
DefaultJobGraphStore(StateHandleStore<JobGraph,R> stateHandleStore,
JobGraphStoreWatcher jobGraphStoreWatcher,
JobGraphStoreUtil jobGraphStoreUtil) |
限定符和类型 | 方法和说明 |
---|---|
Collection<org.apache.flink.api.common.JobID> |
getJobIds()
Get all job ids of submitted job graphs to the submitted job graph store.
|
void |
onAddedJobGraph(org.apache.flink.api.common.JobID jobId)
Callback for
JobGraph instances added by a different JobGraphStore
instance. |
void |
onRemovedJobGraph(org.apache.flink.api.common.JobID jobId)
Callback for
JobGraph instances removed by a different JobGraphStore
instance. |
void |
putJobGraph(JobGraph jobGraph)
Adds the
JobGraph instance. |
JobGraph |
recoverJobGraph(org.apache.flink.api.common.JobID jobId)
|
void |
releaseJobGraph(org.apache.flink.api.common.JobID jobId)
Releases the locks on the specified
JobGraph . |
void |
removeJobGraph(org.apache.flink.api.common.JobID jobId)
Removes the
JobGraph with the given JobID if it exists. |
void |
start(JobGraphStore.JobGraphListener jobGraphListener)
Starts the
JobGraphStore service. |
void |
stop()
Stops the
JobGraphStore service. |
public DefaultJobGraphStore(StateHandleStore<JobGraph,R> stateHandleStore, JobGraphStoreWatcher jobGraphStoreWatcher, JobGraphStoreUtil jobGraphStoreUtil)
public void start(JobGraphStore.JobGraphListener jobGraphListener) throws Exception
JobGraphStore
JobGraphStore
service.start
在接口中 JobGraphStore
Exception
public void stop() throws Exception
JobGraphStore
JobGraphStore
service.stop
在接口中 JobGraphStore
Exception
@Nullable public JobGraph recoverJobGraph(org.apache.flink.api.common.JobID jobId) throws Exception
JobGraphStore
recoverJobGraph
在接口中 JobGraphStore
Exception
public void putJobGraph(JobGraph jobGraph) throws Exception
JobGraphWriter
JobGraph
instance.
If a job graph with the same JobID
exists, it is replaced.
putJobGraph
在接口中 JobGraphWriter
Exception
public void removeJobGraph(org.apache.flink.api.common.JobID jobId) throws Exception
JobGraphWriter
JobGraph
with the given JobID
if it exists.removeJobGraph
在接口中 JobGraphWriter
Exception
public void releaseJobGraph(org.apache.flink.api.common.JobID jobId) throws Exception
JobGraphWriter
JobGraph
.
Releasing the locks allows that another instance can delete the job from the JobGraphStore
.
releaseJobGraph
在接口中 JobGraphWriter
jobId
- specifying the job to release the locks forException
- if the locks cannot be releasedpublic Collection<org.apache.flink.api.common.JobID> getJobIds() throws Exception
JobGraphStore
getJobIds
在接口中 JobGraphStore
Exception
- if the operation failspublic void onAddedJobGraph(org.apache.flink.api.common.JobID jobId)
JobGraphStore.JobGraphListener
JobGraph
instances added by a different JobGraphStore
instance.
Important: It is possible to get false positives and be notified about a job graph, which was added by this instance.
onAddedJobGraph
在接口中 JobGraphStore.JobGraphListener
jobId
- The JobID
of the added job graphpublic void onRemovedJobGraph(org.apache.flink.api.common.JobID jobId)
JobGraphStore.JobGraphListener
JobGraph
instances removed by a different JobGraphStore
instance.onRemovedJobGraph
在接口中 JobGraphStore.JobGraphListener
jobId
- The JobID
of the removed job graphCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.