public abstract class AbstractNonHaServices extends Object implements HighAvailabilityServices
This class returns the standalone variants for the checkpoint recovery factory, the submitted job graph store, the running jobs registry and the blob store.
Modifier and Type | Field and Description |
---|---|
protected Object |
lock |
DEFAULT_JOB_ID, DEFAULT_LEADER_ID
Constructor and Description |
---|
AbstractNonHaServices() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkNotShutdown() |
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.
|
JobGraphStore |
getJobGraphStore()
Gets the submitted job graph store for the job manager.
|
JobResultStore |
getJobResultStore()
Gets the store that holds information about the state of finished jobs.
|
protected boolean |
isShutDown() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getClusterRestEndpointLeaderElection, getClusterRestEndpointLeaderRetriever, getDispatcherLeaderElection, getDispatcherLeaderRetriever, getJobManagerLeaderElection, getJobManagerLeaderRetriever, getJobManagerLeaderRetriever, getResourceManagerLeaderElection, getResourceManagerLeaderRetriever, getWebMonitorLeaderElection, getWebMonitorLeaderRetriever, globalCleanupAsync
protected final Object lock
public CheckpointRecoveryFactory getCheckpointRecoveryFactory()
HighAvailabilityServices
getCheckpointRecoveryFactory
in interface HighAvailabilityServices
public JobGraphStore getJobGraphStore() throws Exception
HighAvailabilityServices
getJobGraphStore
in interface HighAvailabilityServices
Exception
- if the submitted job graph store could not be createdpublic JobResultStore getJobResultStore() throws Exception
HighAvailabilityServices
getJobResultStore
in interface HighAvailabilityServices
Exception
- if job result store could not be createdpublic BlobStore createBlobStore() throws IOException
HighAvailabilityServices
createBlobStore
in interface HighAvailabilityServices
IOException
- if the blob store could not be createdpublic 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
Exception
- Thrown, if an exception occurred while closing these services.public void closeAndCleanupAllData() throws Exception
HighAvailabilityServices
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.
closeAndCleanupAllData
in interface HighAvailabilityServices
Exception
- Thrown, if an exception occurred while closing these services or cleaning
up data stored by them.protected void checkNotShutdown()
protected boolean isShutDown()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.