ZooKeeperMultipleComponentLeaderElectionHaServices
@Deprecated public class ZooKeeperHaServices extends AbstractZooKeeperHaServices
AbstractHaServices
using Apache ZooKeeper. The services store
data in ZooKeeper's nodes as illustrated by the following tree structure:
/flink +/cluster_id_1/leader/resource_manager/latch | | /connection_info | | /dispatcher/latch | | /connection_info | | /rest_server/latch | | /connection_info | | | | | +jobgraphs/job-id-1 | | /job-id-2 | +jobs/job-id-1/leader/latch | | /connection_info | | /checkpoints/latest | | /latest-1 | | /latest-2 | | /checkpoint_id_counter | +/cluster_id_2/leader/resource_manager/latch | | /connection_info | | /dispatcher/latch | | /connection_info | | /rest_server/latch | | /connection_info | | | +jobgraphs/job-id-2 | +jobs/job-id-2/leader/latch | | /connection_info | | /checkpoints/latest | | /latest-1 | | /latest-2 | | /checkpoint_id_counter
The root path "/flink" is configurable via the option HighAvailabilityOptions.HA_ZOOKEEPER_ROOT
. This makes sure Flink stores its data under specific
subtrees in ZooKeeper, for example to accommodate specific permission.
The "cluster_id" part identifies the data stored for a specific Flink "cluster". This "cluster" can be either a standalone or containerized Flink cluster, or it can be job on a framework like YARN (in a "per-job-cluster" mode).
In case of a "per-job-cluster" on YARN, the cluster-id is generated and configured automatically by the client or dispatcher that submits the Job to YARN.
In the case of a standalone cluster, that cluster-id needs to be configured via HighAvailabilityOptions.HA_CLUSTER_ID
. All nodes with the same cluster id will join the same
cluster and participate in the execution of the same set of jobs.
configuration, ioExecutor, logger
DEFAULT_JOB_ID, DEFAULT_LEADER_ID
Constructor and Description |
---|
ZooKeeperHaServices(CuratorFrameworkWithUnhandledErrorListener curatorFrameworkWrapper,
Executor executor,
Configuration configuration,
BlobStoreService blobStoreService)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected LeaderElectionService |
createLeaderElectionService(String leaderPath)
Deprecated.
Create leader election service with specified leaderName.
|
protected LeaderRetrievalService |
createLeaderRetrievalService(String leaderPath)
Deprecated.
Create leader retrieval service with specified leaderName.
|
protected String |
getLeaderPathForDispatcher()
Deprecated.
Get the leader path for Dispatcher.
|
String |
getLeaderPathForJobManager(JobID jobID)
Deprecated.
Get the leader path for specific JobManager.
|
protected String |
getLeaderPathForResourceManager()
Deprecated.
Get the leader path for ResourceManager.
|
protected String |
getLeaderPathForRestServer()
Deprecated.
Get the leader path for RestServer.
|
createCheckpointRecoveryFactory, createJobGraphStore, deleteZNode, getCuratorFramework, internalCleanup, internalCleanupJobData, internalClose
close, closeAndCleanupAllData, createBlobStore, getCheckpointRecoveryFactory, getClusterRestEndpointLeaderElectionService, getClusterRestEndpointLeaderRetriever, getDispatcherLeaderElectionService, getDispatcherLeaderRetriever, getJobGraphStore, getJobManagerLeaderElectionService, getJobManagerLeaderRetriever, getJobManagerLeaderRetriever, getJobResultStore, getResourceManagerLeaderElectionService, getResourceManagerLeaderRetriever, globalCleanupAsync
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getWebMonitorLeaderElectionService, getWebMonitorLeaderRetriever
public ZooKeeperHaServices(CuratorFrameworkWithUnhandledErrorListener curatorFrameworkWrapper, Executor executor, Configuration configuration, BlobStoreService blobStoreService) throws IOException
IOException
protected LeaderElectionService createLeaderElectionService(String leaderPath)
AbstractHaServices
createLeaderElectionService
in class AbstractHaServices
leaderPath
- ConfigMap name in Kubernetes or child node path in Zookeeper.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
public String getLeaderPathForJobManager(JobID jobID)
AbstractHaServices
getLeaderPathForJobManager
in class AbstractHaServices
jobID
- job idprotected String getLeaderPathForRestServer()
AbstractHaServices
getLeaderPathForRestServer
in class AbstractHaServices
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.