public class SessionDispatcherLeaderProcess extends Object implements JobGraphStore.JobGraphListener
Dispatcher
.Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractDispatcherLeaderProcess.State
The state of the
DispatcherLeaderProcess . |
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
log |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Void> |
closeAsync()
Trigger the closing of the resource and return the corresponding
close future.
|
static SessionDispatcherLeaderProcess |
create(UUID leaderSessionId,
org.apache.flink.runtime.dispatcher.runner.AbstractDispatcherLeaderProcess.DispatcherGatewayServiceFactory dispatcherFactory,
JobGraphStore jobGraphStore,
Executor ioExecutor,
FatalErrorHandler fatalErrorHandler) |
CompletableFuture<DispatcherGateway> |
getDispatcherGateway() |
protected Optional<org.apache.flink.runtime.dispatcher.runner.AbstractDispatcherLeaderProcess.DispatcherGatewayService> |
getDispatcherService() |
CompletableFuture<String> |
getLeaderAddressFuture() |
UUID |
getLeaderSessionId() |
CompletableFuture<ApplicationStatus> |
getShutDownFuture() |
void |
onAddedJobGraph(JobID jobId)
Callback for
JobGraph instances added by a different JobGraphStore instance. |
protected CompletableFuture<Void> |
onClose() |
void |
onRemovedJobGraph(JobID jobId)
Callback for
JobGraph instances removed by a different JobGraphStore instance. |
protected void |
onStart() |
void |
start() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
protected void onStart()
protected CompletableFuture<Void> onClose()
public void onAddedJobGraph(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
in interface JobGraphStore.JobGraphListener
jobId
- The JobID
of the added job graphpublic void onRemovedJobGraph(JobID jobId)
JobGraphStore.JobGraphListener
JobGraph
instances removed by a different JobGraphStore
instance.onRemovedJobGraph
in interface JobGraphStore.JobGraphListener
jobId
- The JobID
of the removed job graphpublic static SessionDispatcherLeaderProcess create(UUID leaderSessionId, org.apache.flink.runtime.dispatcher.runner.AbstractDispatcherLeaderProcess.DispatcherGatewayServiceFactory dispatcherFactory, JobGraphStore jobGraphStore, Executor ioExecutor, FatalErrorHandler fatalErrorHandler)
public final void start()
public final UUID getLeaderSessionId()
public final CompletableFuture<DispatcherGateway> getDispatcherGateway()
public final CompletableFuture<String> getLeaderAddressFuture()
public CompletableFuture<ApplicationStatus> getShutDownFuture()
protected final Optional<org.apache.flink.runtime.dispatcher.runner.AbstractDispatcherLeaderProcess.DispatcherGatewayService> getDispatcherService()
public final CompletableFuture<Void> closeAsync()
AutoCloseableAsync
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.