@InterfaceAudience.Public @InterfaceStability.Evolving public abstract class HAServiceTarget extends Object
| Constructor and Description | 
|---|
| HAServiceTarget() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | addFencingParameters(Map<String,String> ret)Hook to allow subclasses to add any parameters they would like to
 expose to fencing implementations/scripts. | 
| abstract void | checkFencingConfigured() | 
| abstract InetSocketAddress | getAddress() | 
| abstract org.apache.hadoop.ha.NodeFencer | getFencer() | 
| Map<String,String> | getFencingParameters() | 
| InetSocketAddress | getHealthMonitorAddress()Returns an optional separate RPC server address for health checks at the
 target node. | 
| HAServiceProtocol | getHealthMonitorProxy(Configuration conf,
                     int timeoutMs)Returns a proxy to connect to the target HA service for health monitoring. | 
| HAServiceProtocol | getProxy(Configuration conf,
        int timeoutMs) | 
| org.apache.hadoop.ha.HAServiceProtocol.HAServiceState | getTransitionTargetHAStatus() | 
| abstract InetSocketAddress | getZKFCAddress() | 
| org.apache.hadoop.ha.ZKFCProtocol | getZKFCProxy(Configuration conf,
            int timeoutMs) | 
| boolean | isAutoFailoverEnabled() | 
| void | setTransitionTargetHAStatus(org.apache.hadoop.ha.HAServiceProtocol.HAServiceState status) | 
| boolean | supportObserver() | 
public abstract InetSocketAddress getAddress()
public InetSocketAddress getHealthMonitorAddress()
HAServiceProtocol.monitorHealth() and
 HAServiceProtocol.getServiceStatus() calls.  This can be useful for
 separating out these calls onto separate RPC handlers to protect against
 resource exhaustion in the main RPC handler pool.  If null (which is the
 default implementation), then all RPC calls go to the address defined by
 getAddress().public abstract InetSocketAddress getZKFCAddress()
public abstract org.apache.hadoop.ha.NodeFencer getFencer()
public abstract void checkFencingConfigured()
                                     throws BadFencingConfigurationException
BadFencingConfigurationException - if the fencing configuration
 appears to be invalid. This is divorced from the above
 getFencer() method so that the configuration can be checked
 during the pre-flight phase of failover.public HAServiceProtocol getProxy(Configuration conf, int timeoutMs) throws IOException
IOExceptionpublic void setTransitionTargetHAStatus(org.apache.hadoop.ha.HAServiceProtocol.HAServiceState status)
public org.apache.hadoop.ha.HAServiceProtocol.HAServiceState getTransitionTargetHAStatus()
public HAServiceProtocol getHealthMonitorProxy(Configuration conf, int timeoutMs) throws IOException
getHealthMonitorAddress() is implemented to return a non-null
 address, then this proxy will connect to that address.  Otherwise, the
 returned proxy defaults to using getAddress(), which means this
 method's behavior is identical to getProxy(Configuration, int).conf - ConfigurationtimeoutMs - timeout in millisecondsIOException - if there is an errorpublic org.apache.hadoop.ha.ZKFCProtocol getZKFCProxy(Configuration conf, int timeoutMs) throws IOException
IOExceptionprotected void addFencingParameters(Map<String,String> ret)
ret - map which can be mutated to pass parameters to the fencerpublic boolean isAutoFailoverEnabled()
public boolean supportObserver()
Copyright © 2022 Apache Software Foundation. All rights reserved.