Package org.apache.hadoop.ha
Class FailoverController
java.lang.Object
org.apache.hadoop.ha.FailoverController
The FailOverController is responsible for electing an active service
on startup or when the current active is changing (eg due to failure),
monitoring the health of a service, and performing a fail-over when a
new active service is either manually selected by a user or elected.
-
Constructor Summary
ConstructorsConstructorDescriptionFailoverController(Configuration conf, HAServiceProtocol.RequestSource source) -
Method Summary
Modifier and TypeMethodDescriptionvoidfailover(HAServiceTarget fromSvc, HAServiceTarget toSvc, boolean forceFence, boolean forceActive) Failover from service 1 to service 2.
-
Constructor Details
-
FailoverController
-
-
Method Details
-
failover
public void failover(HAServiceTarget fromSvc, HAServiceTarget toSvc, boolean forceFence, boolean forceActive) throws FailoverFailedException Failover from service 1 to service 2. If the failover fails then try to failback.- Parameters:
fromSvc- currently active servicetoSvc- service to make activeforceFence- to fence fromSvc even if not strictly necessaryforceActive- try to make toSvc active even if it is not ready- Throws:
FailoverFailedException- if the failover fails
-