@Public
@Evolving
public abstract class HAServiceTarget
extends java.lang.Object
| Constructor | Description |
|---|---|
HAServiceTarget() |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
addFencingParameters(java.util.Map<java.lang.String,java.lang.String> ret) |
Hook to allow subclasses to add any parameters they would like to
expose to fencing implementations/scripts.
|
abstract void |
checkFencingConfigured() |
|
abstract java.net.InetSocketAddress |
getAddress() |
|
abstract NodeFencer |
getFencer() |
|
java.util.Map<java.lang.String,java.lang.String> |
getFencingParameters() |
|
java.net.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 |
getHealthMonitorProxy(Configuration conf,
int timeoutMs,
int retries) |
|
HAServiceProtocol |
getProxy(Configuration conf,
int timeoutMs) |
|
HAServiceProtocol.HAServiceState |
getTransitionTargetHAStatus() |
|
abstract java.net.InetSocketAddress |
getZKFCAddress() |
|
ZKFCProtocol |
getZKFCProxy(Configuration conf,
int timeoutMs) |
|
boolean |
isAutoFailoverEnabled() |
|
void |
setTransitionTargetHAStatus(HAServiceProtocol.HAServiceState status) |
|
boolean |
supportObserver() |
public abstract java.net.InetSocketAddress getAddress()
public java.net.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 java.net.InetSocketAddress getZKFCAddress()
public abstract 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 java.io.IOException
timeoutMs - timeout in milliseconds.conf - Configuration.java.io.IOException - raised on errors performing I/O.public void setTransitionTargetHAStatus(HAServiceProtocol.HAServiceState status)
public HAServiceProtocol.HAServiceState getTransitionTargetHAStatus()
public HAServiceProtocol getHealthMonitorProxy(Configuration conf, int timeoutMs) throws java.io.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 - configuration.timeoutMs - timeout in millisecondsjava.io.IOException - if there is an errorpublic HAServiceProtocol getHealthMonitorProxy(Configuration conf, int timeoutMs, int retries) throws java.io.IOException
java.io.IOExceptionpublic ZKFCProtocol getZKFCProxy(Configuration conf, int timeoutMs) throws java.io.IOException
conf - configuration.timeoutMs - timeout in milliseconds.java.io.IOException - raised on errors performing I/O.public final java.util.Map<java.lang.String,java.lang.String> getFencingParameters()
protected void addFencingParameters(java.util.Map<java.lang.String,java.lang.String> ret)
ret - map which can be mutated to pass parameters to the fencerpublic boolean isAutoFailoverEnabled()
public boolean supportObserver()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.