@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface HAServiceProtocol
| Modifier and Type | Interface and Description |
|---|---|
static class |
HAServiceProtocol.HAServiceState
An HA service may be in active or standby state.
|
static class |
HAServiceProtocol.RequestSource |
static class |
HAServiceProtocol.StateChangeRequestInfo
Information describing the source for a request to change state.
|
| Modifier and Type | Field and Description |
|---|---|
static long |
versionID
Initial version of the protocol
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.ha.HAServiceStatus |
getServiceStatus()
Return the current status of the service.
|
void |
monitorHealth()
Monitor the health of service.
|
void |
transitionToActive(HAServiceProtocol.StateChangeRequestInfo reqInfo)
Request service to transition to active state.
|
void |
transitionToObserver(HAServiceProtocol.StateChangeRequestInfo reqInfo)
Request service to transition to observer state.
|
void |
transitionToStandby(HAServiceProtocol.StateChangeRequestInfo reqInfo)
Request service to transition to standby state.
|
static final long versionID
void monitorHealth()
throws HealthCheckFailedException,
AccessControlException,
IOException
HealthCheckFailedException.
The definition of service not healthy is left to the service.
Note that when health check of an Active service fails,
failover to standby may be done.HealthCheckFailedException - if the health check of a service fails.AccessControlException - if access is denied.IOException - if other errors happenvoid transitionToActive(HAServiceProtocol.StateChangeRequestInfo reqInfo) throws ServiceFailedException, AccessControlException, IOException
ServiceFailedException - if transition from standby to active fails.AccessControlException - if access is denied.IOException - if other errors happenvoid transitionToStandby(HAServiceProtocol.StateChangeRequestInfo reqInfo) throws ServiceFailedException, AccessControlException, IOException
ServiceFailedException - if transition from active to standby fails.AccessControlException - if access is denied.IOException - if other errors happenvoid transitionToObserver(HAServiceProtocol.StateChangeRequestInfo reqInfo) throws ServiceFailedException, AccessControlException, IOException
ServiceFailedException - if transition from standby to observer fails.AccessControlException - if access is denied.IOException - if other errors happenorg.apache.hadoop.ha.HAServiceStatus getServiceStatus()
throws AccessControlException,
IOException
AccessControlException - if access is denied.IOException - if other errors happenHAServiceStatusCopyright © 2019 Apache Software Foundation. All Rights Reserved.