public class ZooKeeperMultipleComponentLeaderElectionHaServices extends AbstractHaServices
/flink +/cluster_id_1/leader/latch | | /resource_manager/connection_info | | /dispatcher/connection_info | | /rest_server/connection_info | | /job-id-1/connection_info | | /job-id-2/connection_info | | | | | +jobgraphs/job-id-1 | | /job-id-2 | +jobs/job-id-1/checkpoints/latest | | /latest-1 | | /latest-2 | | /checkpoint_id_counter
configuration, ioExecutor, logger
DEFAULT_JOB_ID, DEFAULT_LEADER_ID
Constructor and Description |
---|
ZooKeeperMultipleComponentLeaderElectionHaServices(CuratorFrameworkWithUnhandledErrorListener curatorFrameworkWrapper,
Configuration configuration,
Executor executor,
BlobStoreService blobStoreService,
FatalErrorHandler fatalErrorHandler) |
Modifier and Type | Method and Description |
---|---|
CheckpointRecoveryFactory |
createCheckpointRecoveryFactory()
Create the checkpoint recovery factory for the job manager.
|
JobGraphStore |
createJobGraphStore()
Create the submitted job graph store for the job manager.
|
protected MultipleComponentLeaderElectionDriverFactory |
createLeaderElectionDriverFactory(String leaderName)
Create
MultipleComponentLeaderElectionDriverFactory instance for the specified
leaderName. |
protected LeaderRetrievalService |
createLeaderRetrievalService(String leaderPath)
Create leader retrieval service with specified leaderName.
|
protected void |
deleteZNode(String path) |
protected String |
getLeaderPathForDispatcher()
Get the leader path for Dispatcher.
|
protected String |
getLeaderPathForJobManager(JobID jobID)
Get the leader path for specific JobManager.
|
protected String |
getLeaderPathForResourceManager()
Get the leader path for ResourceManager.
|
protected String |
getLeaderPathForRestServer()
Get the leader path for RestServer.
|
protected void |
internalCleanup()
Clean up the meta data in the distributed system(e.g.
|
protected void |
internalCleanupJobData(JobID jobID)
Clean up the meta data in the distributed system(e.g.
|
protected void |
internalClose()
Closes the components which is used for external operations(e.g.
|
close, closeAndCleanupAllData, createBlobStore, getCheckpointRecoveryFactory, getClusterRestEndpointLeaderElection, getClusterRestEndpointLeaderRetriever, getDispatcherLeaderElection, getDispatcherLeaderRetriever, getJobGraphStore, getJobManagerLeaderElection, getJobManagerLeaderRetriever, getJobManagerLeaderRetriever, getJobResultStore, getResourceManagerLeaderElection, getResourceManagerLeaderRetriever, globalCleanupAsync
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getWebMonitorLeaderElection, getWebMonitorLeaderRetriever
public ZooKeeperMultipleComponentLeaderElectionHaServices(CuratorFrameworkWithUnhandledErrorListener curatorFrameworkWrapper, Configuration configuration, Executor executor, BlobStoreService blobStoreService, FatalErrorHandler fatalErrorHandler) throws IOException
IOException
public CheckpointRecoveryFactory createCheckpointRecoveryFactory() throws Exception
AbstractHaServices
createCheckpointRecoveryFactory
in class AbstractHaServices
Exception
public JobGraphStore createJobGraphStore() throws Exception
AbstractHaServices
createJobGraphStore
in class AbstractHaServices
Exception
- if the submitted job graph store could not be createdprotected void internalClose() throws Exception
AbstractHaServices
internalClose
in class AbstractHaServices
Exception
- if the close operation failedprotected void internalCleanup() throws Exception
AbstractHaServices
If an exception occurs during internal cleanup, we will continue the cleanup in AbstractHaServices.closeAndCleanupAllData()
and report exceptions only after all cleanup steps have been
attempted.
internalCleanup
in class AbstractHaServices
Exception
- when do the cleanup operation on external storage.protected void internalCleanupJobData(JobID jobID) throws Exception
AbstractHaServices
internalCleanupJobData
in class AbstractHaServices
jobID
- The identifier of the job to cleanup.Exception
- when do the cleanup operation on external storage.protected MultipleComponentLeaderElectionDriverFactory createLeaderElectionDriverFactory(String leaderName)
AbstractHaServices
MultipleComponentLeaderElectionDriverFactory
instance for the specified
leaderName.createLeaderElectionDriverFactory
in class AbstractHaServices
leaderName
- ConfigMap name in Kubernetes or child node path in Zookeeper.MultipleComponentLeaderElectionDriverFactory
used for the LeaderElectionService
.protected LeaderRetrievalService createLeaderRetrievalService(String leaderPath)
AbstractHaServices
createLeaderRetrievalService
in class AbstractHaServices
leaderPath
- ConfigMap name in Kubernetes or child node path in Zookeeper.protected String getLeaderPathForResourceManager()
AbstractHaServices
getLeaderPathForResourceManager
in class AbstractHaServices
protected String getLeaderPathForDispatcher()
AbstractHaServices
getLeaderPathForDispatcher
in class AbstractHaServices
protected String getLeaderPathForJobManager(JobID jobID)
AbstractHaServices
getLeaderPathForJobManager
in class AbstractHaServices
jobID
- job idprotected String getLeaderPathForRestServer()
AbstractHaServices
getLeaderPathForRestServer
in class AbstractHaServices
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.