public interface HighAvailabilityServices extends ClientHighAvailabilityServices, GloballyCleanableResource
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.
|
default LeaderElectionService |
getClusterRestEndpointLeaderElectionService()
Gets the leader election service for the cluster's rest endpoint.
|
default LeaderRetrievalService |
getClusterRestEndpointLeaderRetriever()
Get the leader retriever for the cluster's rest endpoint.
|
LeaderElectionService |
getDispatcherLeaderElectionService()
Gets the leader election service for the cluster's dispatcher.
|
LeaderRetrievalService |
getDispatcherLeaderRetriever()
Gets the leader retriever for the dispatcher.
|
JobGraphStore |
getJobGraphStore()
Gets the submitted job graph store for the job manager.
|
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.
|
JobResultStore |
getJobResultStore()
Gets the store that holds information about the state of finished jobs.
|
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.
|
default LeaderElectionService |
getWebMonitorLeaderElectionService()
Deprecated.
Use
getClusterRestEndpointLeaderElectionService() instead. |
default LeaderRetrievalService |
getWebMonitorLeaderRetriever()
Deprecated.
just use
getClusterRestEndpointLeaderRetriever() instead of this method. |
default CompletableFuture<Void> |
globalCleanupAsync(JobID jobId,
Executor executor)
globalCleanupAsync is expected to be called from the main thread. |
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.@Deprecated default LeaderRetrievalService getWebMonitorLeaderRetriever()
getClusterRestEndpointLeaderRetriever()
instead of this method.ClientHighAvailabilityServices
. See also FLINK-13750.LeaderElectionService getResourceManagerLeaderElectionService()
LeaderElectionService getDispatcherLeaderElectionService()
LeaderElectionService getJobManagerLeaderElectionService(JobID jobID)
jobID
- The identifier of the job running the election.@Deprecated default LeaderElectionService getWebMonitorLeaderElectionService()
getClusterRestEndpointLeaderElectionService()
instead.CheckpointRecoveryFactory getCheckpointRecoveryFactory() throws Exception
Exception
JobGraphStore getJobGraphStore() throws Exception
Exception
- if the submitted job graph store could not be createdJobResultStore getJobResultStore() throws Exception
Exception
- if job result store could not be createdBlobStore createBlobStore() throws IOException
IOException
- if the blob store could not be createddefault LeaderElectionService getClusterRestEndpointLeaderElectionService()
default LeaderRetrievalService getClusterRestEndpointLeaderRetriever()
ClientHighAvailabilityServices
getClusterRestEndpointLeaderRetriever
in interface ClientHighAvailabilityServices
void 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.default CompletableFuture<Void> globalCleanupAsync(JobID jobId, Executor executor)
GloballyCleanableResource
globalCleanupAsync
is expected to be called from the main thread. Heavy IO tasks
should be outsourced into the passed cleanupExecutor
. Thread-safety must be ensured.globalCleanupAsync
in interface GloballyCleanableResource
jobId
- The JobID
of the job for which the local data should be cleaned up.executor
- The fallback executor for IO-heavy operations.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.