org.apache.hadoop.ha
Class HAServiceTarget
java.lang.Object
org.apache.hadoop.ha.HAServiceTarget
@InterfaceAudience.Public
@InterfaceStability.Evolving
public abstract class HAServiceTarget
- extends Object
Represents a target of the client side HA administration commands.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HAServiceTarget
public HAServiceTarget()
getAddress
public abstract InetSocketAddress getAddress()
- Returns:
- the IPC address of the target node.
getZKFCAddress
public abstract InetSocketAddress getZKFCAddress()
- Returns:
- the IPC address of the ZKFC on the target node
getFencer
public abstract org.apache.hadoop.ha.NodeFencer getFencer()
- Returns:
- a Fencer implementation configured for this target node
checkFencingConfigured
public abstract void checkFencingConfigured()
throws BadFencingConfigurationException
- Throws:
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.
getProxy
public HAServiceProtocol getProxy(Configuration conf,
int timeoutMs)
throws IOException
- Returns:
- a proxy to connect to the target HA Service.
- Throws:
IOException
getZKFCProxy
public org.apache.hadoop.ha.ZKFCProtocol getZKFCProxy(Configuration conf,
int timeoutMs)
throws IOException
- Returns:
- a proxy to the ZKFC which is associated with this HA service.
- Throws:
IOException
getFencingParameters
public final Map<String,String> getFencingParameters()
addFencingParameters
protected void addFencingParameters(Map<String,String> ret)
- Hook to allow subclasses to add any parameters they would like to
expose to fencing implementations/scripts. Fencing methods are free
to use this map as they see fit -- notably, the shell script
implementation takes each entry, prepends 'target_', substitutes
'_' for '.', and adds it to the environment of the script.
Subclass implementations should be sure to delegate to the superclass
implementation as well as adding their own keys.
- Parameters:
ret
- map which can be mutated to pass parameters to the fencer
isAutoFailoverEnabled
public boolean isAutoFailoverEnabled()
- Returns:
- true if auto failover should be considered enabled
Copyright © 2014 Apache Software Foundation. All Rights Reserved.