public class EmbeddedHaServices extends AbstractNonHaServices
HighAvailabilityServices
for the non-high-availability case
where all participants (ResourceManager, JobManagers, TaskManagers) run in the same process.
This implementation has no dependencies on any external services. It returns a fix pre-configured ResourceManager, and stores checkpoints and metadata simply on the heap or on a local file system and therefore in a storage without guarantees.
lock
DEFAULT_JOB_ID, DEFAULT_LEADER_ID
Constructor and Description |
---|
EmbeddedHaServices(Executor executor) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the high availability services, releasing all resources.
|
LeaderElection |
getClusterRestEndpointLeaderElection()
Gets the
LeaderElection for the cluster's rest endpoint. |
LeaderRetrievalService |
getClusterRestEndpointLeaderRetriever()
Get the leader retriever for the cluster's rest endpoint.
|
LeaderElection |
getDispatcherLeaderElection()
Gets the
LeaderElection for the cluster's dispatcher. |
LeaderRetrievalService |
getDispatcherLeaderRetriever()
Gets the leader retriever for the dispatcher.
|
LeaderElection |
getJobManagerLeaderElection(JobID jobID)
Gets the
LeaderElection for the job with the given JobID . |
LeaderRetrievalService |
getJobManagerLeaderRetriever(JobID jobID)
Gets the leader retriever for the job JobMaster which is responsible for the given job.
|
LeaderRetrievalService |
getJobManagerLeaderRetriever(JobID jobID,
String defaultJobManagerAddress)
Gets the leader retriever for the job JobMaster which is responsible for the given job.
|
LeaderElection |
getResourceManagerLeaderElection()
Gets the
LeaderElection for the cluster's resource manager. |
LeaderRetrievalService |
getResourceManagerLeaderRetriever()
Gets the leader retriever for the cluster's resource manager.
|
checkNotShutdown, closeAndCleanupAllData, createBlobStore, getCheckpointRecoveryFactory, getJobGraphStore, getJobResultStore, isShutDown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getWebMonitorLeaderElection, getWebMonitorLeaderRetriever, globalCleanupAsync
public EmbeddedHaServices(Executor executor)
public LeaderRetrievalService getResourceManagerLeaderRetriever()
HighAvailabilityServices
public LeaderRetrievalService getDispatcherLeaderRetriever()
HighAvailabilityServices
public LeaderElection getResourceManagerLeaderElection()
HighAvailabilityServices
LeaderElection
for the cluster's resource manager.public LeaderElection getDispatcherLeaderElection()
HighAvailabilityServices
LeaderElection
for the cluster's dispatcher.public LeaderRetrievalService getJobManagerLeaderRetriever(JobID jobID)
HighAvailabilityServices
jobID
- The identifier of the job.public LeaderRetrievalService getJobManagerLeaderRetriever(JobID jobID, String defaultJobManagerAddress)
HighAvailabilityServices
jobID
- The identifier of the job.defaultJobManagerAddress
- JobManager address which will be returned by a static leader
retrieval service.public LeaderRetrievalService getClusterRestEndpointLeaderRetriever()
ClientHighAvailabilityServices
public LeaderElection getJobManagerLeaderElection(JobID jobID)
HighAvailabilityServices
LeaderElection
for the job with the given JobID
.public LeaderElection getClusterRestEndpointLeaderElection()
HighAvailabilityServices
LeaderElection
for the cluster's rest endpoint.public void close() throws Exception
HighAvailabilityServices
This method does not delete or clean up any data stored in external stores (file systems, ZooKeeper, etc). Another instance of the high availability services will be able to recover the job.
If an exception occurs during closing services, this method will attempt to continue closing other services and report exceptions only after all services have been attempted to be closed.
close
in interface AutoCloseable
close
in interface HighAvailabilityServices
close
in class AbstractNonHaServices
Exception
- Thrown, if an exception occurred while closing these services.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.