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 |
cleanupAllData()
Deletes all data stored by high availability services in external stores.
|
void |
close()
Closes the high availability services, releasing all resources.
|
default void |
closeWithOptionalClean(boolean cleanupData)
|
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 LeaderElection |
getClusterRestEndpointLeaderElection()
Gets the
LeaderElection for the cluster's rest endpoint. |
default 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.
|
JobGraphStore |
getJobGraphStore()
Gets the submitted job graph store for the job manager.
|
LeaderElection |
getJobManagerLeaderElection(JobID jobID)
Gets the
LeaderElection for the job with the given JobID . |
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.
|
LeaderElection |
getResourceManagerLeaderElection()
Gets the
LeaderElection for the cluster's resource manager. |
LeaderRetrievalService |
getResourceManagerLeaderRetriever()
Gets the leader retriever for the cluster's resource manager.
|
default LeaderElection |
getWebMonitorLeaderElection()
Deprecated.
Use
getClusterRestEndpointLeaderElection() 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.LeaderElection getResourceManagerLeaderElection()
LeaderElection
for the cluster's resource manager.LeaderElection getDispatcherLeaderElection()
LeaderElection
for the cluster's dispatcher.LeaderElection getJobManagerLeaderElection(JobID jobID)
LeaderElection
for the job with the given JobID
.@Deprecated default LeaderElection getWebMonitorLeaderElection()
getClusterRestEndpointLeaderElection()
instead.LeaderElection
for the cluster's rest endpoint.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 LeaderElection getClusterRestEndpointLeaderElection()
LeaderElection
for the cluster's rest endpoint.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 cleanupAllData() throws Exception
After this method was called, 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
- if an error occurred while cleaning up data stored by them.default void closeWithOptionalClean(boolean cleanupData) throws Exception
cleanupAllData()
(if true
is passed as a parameter) before calling
close()
on this instance. Any error that appeared during the cleanup will be
propagated after calling close()
.Exception
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.