@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface HAServiceProtocol
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(org.apache.hadoop.ha.HAServiceProtocol.StateChangeRequestInfo reqInfo)
Request service to transition to active state.
|
void |
transitionToObserver(org.apache.hadoop.ha.HAServiceProtocol.StateChangeRequestInfo reqInfo)
Request service to transition to observer state.
|
void |
transitionToStandby(org.apache.hadoop.ha.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(org.apache.hadoop.ha.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(org.apache.hadoop.ha.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(org.apache.hadoop.ha.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 happenHAServiceStatus
Copyright © 2020 Apache Software Foundation. All rights reserved.