public class ResourceManagerServiceImpl extends Object implements ResourceManagerService, LeaderContender
ResourceManagerService.| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
closeAsync() |
static ResourceManagerServiceImpl |
create(ResourceManagerFactory<?> resourceManagerFactory,
org.apache.flink.configuration.Configuration configuration,
ResourceID resourceId,
org.apache.flink.runtime.rpc.RpcService rpcService,
HighAvailabilityServices highAvailabilityServices,
HeartbeatServices heartbeatServices,
org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler,
ClusterInformation clusterInformation,
String webInterfaceUrl,
MetricRegistry metricRegistry,
String hostname,
Executor ioExecutor) |
CompletableFuture<Void> |
deregisterApplication(ApplicationStatus applicationStatus,
String diagnostics)
Deregister the Flink application from the resource management system by signalling the
ResourceManager. |
ResourceManager<?> |
getLeaderResourceManager() |
CompletableFuture<Void> |
getTerminationFuture()
Return termination future of the service.
|
void |
grantLeadership(UUID newLeaderSessionID)
Callback method which is called by the
LeaderElectionService upon selecting this
instance as the new leader. |
void |
handleError(Exception exception)
Callback method which is called by
LeaderElectionService in case of an error in the
service thread. |
void |
revokeLeadership()
Callback method which is called by the
LeaderElectionService upon revoking the
leadership of a former leader. |
void |
start()
Start the service.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDescriptionpublic void start()
throws Exception
ResourceManagerServicestart in interface ResourceManagerServiceException - if the service cannot be startedpublic CompletableFuture<Void> getTerminationFuture()
ResourceManagerServicegetTerminationFuture in interface ResourceManagerServicepublic CompletableFuture<Void> deregisterApplication(ApplicationStatus applicationStatus, @Nullable String diagnostics)
ResourceManagerServiceResourceManager.deregisterApplication in interface ResourceManagerServiceapplicationStatus - to terminate the application withdiagnostics - additional information about the shut down, can be nullpublic CompletableFuture<Void> closeAsync()
closeAsync in interface org.apache.flink.util.AutoCloseableAsyncpublic void grantLeadership(UUID newLeaderSessionID)
LeaderContenderLeaderElectionService upon selecting this
instance as the new leader. The method is called with the new leader session ID.grantLeadership in interface LeaderContendernewLeaderSessionID - New leader session IDpublic void revokeLeadership()
LeaderContenderLeaderElectionService upon revoking the
leadership of a former leader. This might happen in case that multiple contenders have been
granted leadership.revokeLeadership in interface LeaderContenderpublic void handleError(Exception exception)
LeaderContenderLeaderElectionService in case of an error in the
service thread.handleError in interface LeaderContenderexception - Caught exception@VisibleForTesting @Nullable public ResourceManager<?> getLeaderResourceManager()
public static ResourceManagerServiceImpl create(ResourceManagerFactory<?> resourceManagerFactory, org.apache.flink.configuration.Configuration configuration, ResourceID resourceId, org.apache.flink.runtime.rpc.RpcService rpcService, HighAvailabilityServices highAvailabilityServices, HeartbeatServices heartbeatServices, org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler, ClusterInformation clusterInformation, @Nullable String webInterfaceUrl, MetricRegistry metricRegistry, String hostname, Executor ioExecutor) throws org.apache.flink.util.ConfigurationException
org.apache.flink.util.ConfigurationExceptionCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.