public class KubernetesHaServices
extends org.apache.flink.runtime.highavailability.AbstractHaServices
AbstractHaServices using Kubernetes.
All the HA information relevant for a specific component will be stored in a single ConfigMap. For example, the Dispatcher's ConfigMap would then contain the current leader, the running jobs and the pointers to the persisted JobGraphs. The JobManager's ConfigMap would then contain the current leader, the pointers to the checkpoints and the checkpoint ID counter.
The ConfigMap name will be created with the pattern "{clusterId}-{componentName}-leader". Given that the cluster id is configured to "k8s-ha-app1", then we could get the following ConfigMap names. e.g. k8s-ha-app1-restserver-leader, k8s-ha-app1-00000000000000000000000000000000-jobmanager-leader
Note that underline("_") is not allowed in Kubernetes ConfigMap name.
| Modifier and Type | Method and Description |
|---|---|
org.apache.flink.runtime.checkpoint.CheckpointRecoveryFactory |
createCheckpointRecoveryFactory() |
org.apache.flink.runtime.jobmanager.JobGraphStore |
createJobGraphStore() |
org.apache.flink.runtime.leaderelection.LeaderElectionService |
createLeaderElectionService(String leaderName) |
org.apache.flink.runtime.leaderretrieval.LeaderRetrievalService |
createLeaderRetrievalService(String leaderName) |
org.apache.flink.runtime.highavailability.RunningJobsRegistry |
createRunningJobsRegistry() |
protected String |
getLeaderPathForDispatcher() |
String |
getLeaderPathForJobManager(org.apache.flink.api.common.JobID jobID) |
protected String |
getLeaderPathForResourceManager() |
protected String |
getLeaderPathForRestServer() |
void |
internalCleanup() |
void |
internalCleanupJobData(org.apache.flink.api.common.JobID jobID) |
void |
internalClose() |
cleanupJobData, close, closeAndCleanupAllData, createBlobStore, getCheckpointRecoveryFactory, getClusterRestEndpointLeaderElectionService, getClusterRestEndpointLeaderRetriever, getDispatcherLeaderElectionService, getDispatcherLeaderRetriever, getJobGraphStore, getJobManagerLeaderElectionService, getJobManagerLeaderRetriever, getJobManagerLeaderRetriever, getResourceManagerLeaderElectionService, getResourceManagerLeaderRetriever, getRunningJobsRegistrypublic org.apache.flink.runtime.leaderelection.LeaderElectionService createLeaderElectionService(String leaderName)
createLeaderElectionService in class org.apache.flink.runtime.highavailability.AbstractHaServicespublic org.apache.flink.runtime.leaderretrieval.LeaderRetrievalService createLeaderRetrievalService(String leaderName)
createLeaderRetrievalService in class org.apache.flink.runtime.highavailability.AbstractHaServicespublic org.apache.flink.runtime.checkpoint.CheckpointRecoveryFactory createCheckpointRecoveryFactory()
createCheckpointRecoveryFactory in class org.apache.flink.runtime.highavailability.AbstractHaServicespublic org.apache.flink.runtime.jobmanager.JobGraphStore createJobGraphStore()
throws Exception
createJobGraphStore in class org.apache.flink.runtime.highavailability.AbstractHaServicesExceptionpublic org.apache.flink.runtime.highavailability.RunningJobsRegistry createRunningJobsRegistry()
createRunningJobsRegistry in class org.apache.flink.runtime.highavailability.AbstractHaServicespublic void internalClose()
internalClose in class org.apache.flink.runtime.highavailability.AbstractHaServicespublic void internalCleanup()
throws Exception
internalCleanup in class org.apache.flink.runtime.highavailability.AbstractHaServicesExceptionpublic void internalCleanupJobData(org.apache.flink.api.common.JobID jobID)
throws Exception
internalCleanupJobData in class org.apache.flink.runtime.highavailability.AbstractHaServicesExceptionprotected String getLeaderPathForResourceManager()
getLeaderPathForResourceManager in class org.apache.flink.runtime.highavailability.AbstractHaServicesprotected String getLeaderPathForDispatcher()
getLeaderPathForDispatcher in class org.apache.flink.runtime.highavailability.AbstractHaServicespublic String getLeaderPathForJobManager(org.apache.flink.api.common.JobID jobID)
getLeaderPathForJobManager in class org.apache.flink.runtime.highavailability.AbstractHaServicesprotected String getLeaderPathForRestServer()
getLeaderPathForRestServer in class org.apache.flink.runtime.highavailability.AbstractHaServicesCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.