Class StandaloneHaServices
- java.lang.Object
-
- org.apache.flink.runtime.highavailability.nonha.AbstractNonHaServices
-
- org.apache.flink.runtime.highavailability.nonha.standalone.StandaloneHaServices
-
- All Implemented Interfaces:
AutoCloseable
,GloballyCleanableResource
,ClientHighAvailabilityServices
,HighAvailabilityServices
public class StandaloneHaServices extends AbstractNonHaServices
An implementation of theHighAvailabilityServices
for the non-high-availability case. This implementation can be used for testing, and for cluster setups that do not tolerate failures of the master processes (JobManager, ResourceManager).This implementation has no dependencies on any external services. It returns a fix pre-configured ResourceManager and JobManager, and stores checkpoints and metadata simply on the heap or on a local file system and therefore in a storage without guarantees.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.runtime.highavailability.nonha.AbstractNonHaServices
lock
-
Fields inherited from interface org.apache.flink.runtime.highavailability.HighAvailabilityServices
DEFAULT_JOB_ID, DEFAULT_LEADER_ID
-
-
Constructor Summary
Constructors Constructor Description StandaloneHaServices(String resourceManagerAddress, String dispatcherAddress, String clusterRestEndpointAddress)
Creates a new services class for the fix pre-defined leaders.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LeaderElection
getClusterRestEndpointLeaderElection()
Gets theLeaderElection
for the cluster's rest endpoint.LeaderRetrievalService
getClusterRestEndpointLeaderRetriever()
Get the leader retriever for the cluster's rest endpoint.LeaderElection
getDispatcherLeaderElection()
Gets theLeaderElection
for the cluster's dispatcher.LeaderRetrievalService
getDispatcherLeaderRetriever()
Gets the leader retriever for the dispatcher.LeaderElection
getJobManagerLeaderElection(org.apache.flink.api.common.JobID jobID)
Gets theLeaderElection
for the job with the givenJobID
.LeaderRetrievalService
getJobManagerLeaderRetriever(org.apache.flink.api.common.JobID jobID)
Gets the leader retriever for the job JobMaster which is responsible for the given job.LeaderRetrievalService
getJobManagerLeaderRetriever(org.apache.flink.api.common.JobID jobID, String defaultJobManagerAddress)
Gets the leader retriever for the job JobMaster which is responsible for the given job.LeaderElection
getResourceManagerLeaderElection()
Gets theLeaderElection
for the cluster's resource manager.LeaderRetrievalService
getResourceManagerLeaderRetriever()
Gets the leader retriever for the cluster's resource manager.-
Methods inherited from class org.apache.flink.runtime.highavailability.nonha.AbstractNonHaServices
checkNotShutdown, cleanupAllData, close, createBlobStore, getCheckpointRecoveryFactory, getExecutionPlanStore, getJobResultStore, isShutDown
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.runtime.highavailability.HighAvailabilityServices
closeWithOptionalClean, getWebMonitorLeaderElection, getWebMonitorLeaderRetriever, globalCleanupAsync
-
-
-
-
Constructor Detail
-
StandaloneHaServices
public StandaloneHaServices(String resourceManagerAddress, String dispatcherAddress, String clusterRestEndpointAddress)
Creates a new services class for the fix pre-defined leaders.- Parameters:
resourceManagerAddress
- The fix address of the ResourceManagerclusterRestEndpointAddress
-
-
-
Method Detail
-
getResourceManagerLeaderRetriever
public LeaderRetrievalService getResourceManagerLeaderRetriever()
Description copied from interface:HighAvailabilityServices
Gets the leader retriever for the cluster's resource manager.
-
getDispatcherLeaderRetriever
public LeaderRetrievalService getDispatcherLeaderRetriever()
Description copied from interface:HighAvailabilityServices
Gets the leader retriever for the dispatcher. This leader retrieval service is not always accessible.
-
getResourceManagerLeaderElection
public LeaderElection getResourceManagerLeaderElection()
Description copied from interface:HighAvailabilityServices
Gets theLeaderElection
for the cluster's resource manager.
-
getDispatcherLeaderElection
public LeaderElection getDispatcherLeaderElection()
Description copied from interface:HighAvailabilityServices
Gets theLeaderElection
for the cluster's dispatcher.
-
getJobManagerLeaderRetriever
public LeaderRetrievalService getJobManagerLeaderRetriever(org.apache.flink.api.common.JobID jobID)
Description copied from interface:HighAvailabilityServices
Gets the leader retriever for the job JobMaster which is responsible for the given job.- Parameters:
jobID
- The identifier of the job.- Returns:
- Leader retrieval service to retrieve the job manager for the given job
-
getJobManagerLeaderRetriever
public LeaderRetrievalService getJobManagerLeaderRetriever(org.apache.flink.api.common.JobID jobID, String defaultJobManagerAddress)
Description copied from interface:HighAvailabilityServices
Gets the leader retriever for the job JobMaster which is responsible for the given job.- Parameters:
jobID
- The identifier of the job.defaultJobManagerAddress
- JobManager address which will be returned by a static leader retrieval service.- Returns:
- Leader retrieval service to retrieve the job manager for the given job
-
getJobManagerLeaderElection
public LeaderElection getJobManagerLeaderElection(org.apache.flink.api.common.JobID jobID)
Description copied from interface:HighAvailabilityServices
Gets theLeaderElection
for the job with the givenJobID
.
-
getClusterRestEndpointLeaderRetriever
public LeaderRetrievalService getClusterRestEndpointLeaderRetriever()
Description copied from interface:ClientHighAvailabilityServices
Get the leader retriever for the cluster's rest endpoint.- Returns:
- the leader retriever for cluster's rest endpoint.
-
getClusterRestEndpointLeaderElection
public LeaderElection getClusterRestEndpointLeaderElection()
Description copied from interface:HighAvailabilityServices
Gets theLeaderElection
for the cluster's rest endpoint.
-
-