Class FailoverController

java.lang.Object
org.apache.hadoop.ha.FailoverController

@Private @Evolving public class FailoverController extends Object
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 Details

  • 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 service
      toSvc - service to make active
      forceFence - to fence fromSvc even if not strictly necessary
      forceActive - try to make toSvc active even if it is not ready
      Throws:
      FailoverFailedException - if the failover fails