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.
lockDEFAULT_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.
|
LeaderElectionService |
getJobManagerLeaderElectionService(JobID jobID)
Gets the leader election service for the given job.
|
LeaderRetrievalService |
getJobManagerLeaderRetriever(JobID jobID)
Gets the leader retriever for the job JobMaster which is responsible for the given job
|
LeaderElectionService |
getResourceManagerLeaderElectionService()
Gets the leader election service for the cluster's resource manager.
|
LeaderRetrievalService |
getResourceManagerLeaderRetriever()
Gets the leader retriever for the cluster's resource manager.
|
checkNotShutdown, closeAndCleanupAllData, createBlobStore, getCheckpointRecoveryFactory, getRunningJobsRegistry, getSubmittedJobGraphStore, isShutDownpublic EmbeddedHaServices(Executor executor)
public LeaderRetrievalService getResourceManagerLeaderRetriever()
HighAvailabilityServicespublic LeaderElectionService getResourceManagerLeaderElectionService()
HighAvailabilityServicespublic LeaderRetrievalService getJobManagerLeaderRetriever(JobID jobID)
HighAvailabilityServicesjobID - The identifier of the job.public LeaderElectionService getJobManagerLeaderElectionService(JobID jobID)
HighAvailabilityServicesjobID - The identifier of the job running the election.public void close()
throws Exception
HighAvailabilityServicesThis 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 AutoCloseableclose in interface HighAvailabilityServicesclose in class AbstractNonHaServicesException - Thrown, if an exception occurred while closing these services.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.