Package org.apache.hadoop.ha
Class NodeFencer
java.lang.Object
org.apache.hadoop.ha.NodeFencer
This class parses the configured list of fencing methods, and
is responsible for trying each one in turn while logging informative
output.
The fencing methods are configured as a carriage-return separated list. Each line in the list is of the form:
com.example.foo.MyMethod(arg string)
or
com.example.foo.MyMethod
The class provided must implement the FenceMethod interface.
The fencing methods that ship with Hadoop may also be referred to
by shortened names:
shell(/path/to/some/script.sh args...)(seeShellCommandFencer)sshfence(...)(seeSshFenceByTcpPort)powershell(...)(seePowerShellFencer)
-
Method Summary
Modifier and TypeMethodDescriptionstatic NodeFencercreate(Configuration conf, String confKey) booleanfence(HAServiceTarget fromSvc) booleanfence(HAServiceTarget fromSvc, HAServiceTarget toSvc)
-
Method Details
-
create
public static NodeFencer create(Configuration conf, String confKey) throws BadFencingConfigurationException - Throws:
BadFencingConfigurationException
-
fence
-
fence
-