public interface HighAvailabilityServices extends AutoCloseable
Modifier and Type | Field and Description |
---|---|
static JobID |
DEFAULT_JOB_ID
This JobID should be used to identify the old JobManager when using the
HighAvailabilityServices . |
static UUID |
DEFAULT_LEADER_ID
This UUID should be used when no proper leader election happens, but a simple
pre-configured leader is used.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the high availability services, releasing all resources.
|
void |
closeAndCleanupAllData()
Closes the high availability services (releasing all resources) and deletes
all data stored by these services in external stores.
|
BlobStore |
createBlobStore()
Creates the BLOB store in which BLOBs are stored in a highly-available fashion.
|
CheckpointRecoveryFactory |
getCheckpointRecoveryFactory()
Gets the checkpoint recovery factory for the job manager
|
LeaderElectionService |
getDispatcherLeaderElectionService()
Gets the leader election service for the cluster's dispatcher.
|
LeaderRetrievalService |
getDispatcherLeaderRetriever()
Gets the leader retriever for the dispatcher.
|
LeaderElectionService |
getJobManagerLeaderElectionService(JobID jobID)
Gets the leader election service for the given job.
|
LeaderRetrievalService |
getJobManagerLeaderRetriever(JobID jobID)
Deprecated.
This method should only be used by the legacy code where the JobManager acts as the master.
|
LeaderRetrievalService |
getJobManagerLeaderRetriever(JobID jobID,
String defaultJobManagerAddress)
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.
|
RunningJobsRegistry |
getRunningJobsRegistry()
Gets the registry that holds information about whether jobs are currently running.
|
SubmittedJobGraphStore |
getSubmittedJobGraphStore()
Gets the submitted job graph store for the job manager
|
LeaderElectionService |
getWebMonitorLeaderElectionService() |
LeaderRetrievalService |
getWebMonitorLeaderRetriever() |
static final UUID DEFAULT_LEADER_ID
static final JobID DEFAULT_JOB_ID
HighAvailabilityServices
. With the new mode every JobMaster will have a
distinct JobID assigned.LeaderRetrievalService getResourceManagerLeaderRetriever()
LeaderRetrievalService getDispatcherLeaderRetriever()
@Deprecated LeaderRetrievalService getJobManagerLeaderRetriever(JobID jobID)
jobID
- The identifier of the job.LeaderRetrievalService getJobManagerLeaderRetriever(JobID jobID, String defaultJobManagerAddress)
jobID
- The identifier of the job.defaultJobManagerAddress
- JobManager address which will be returned by
a static leader retrieval service.LeaderRetrievalService getWebMonitorLeaderRetriever()
LeaderElectionService getResourceManagerLeaderElectionService()
LeaderElectionService getDispatcherLeaderElectionService()
LeaderElectionService getJobManagerLeaderElectionService(JobID jobID)
jobID
- The identifier of the job running the election.LeaderElectionService getWebMonitorLeaderElectionService()
CheckpointRecoveryFactory getCheckpointRecoveryFactory()
SubmittedJobGraphStore getSubmittedJobGraphStore() throws Exception
Exception
- if the submitted job graph store could not be createdRunningJobsRegistry getRunningJobsRegistry() throws Exception
Exception
BlobStore createBlobStore() throws IOException
IOException
- if the blob store could not be createdvoid close() throws Exception
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
Exception
- Thrown, if an exception occurred while closing these services.void closeAndCleanupAllData() throws Exception
After this method was called, the any job or session that was managed by these high availability services will be unrecoverable.
If an exception occurs during cleanup, this method will attempt to continue the cleanup and report exceptions only after all cleanup steps have been attempted.
Exception
- Thrown, if an exception occurred while closing these services
or cleaning up data stored by them.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.