MAPREDUCE-4103. Fix HA docs for changes to shell command fencer args. Contributed by Todd Lipcon.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1309535 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e5990c53e8
commit
3c7d74132b
|
@ -43,6 +43,8 @@ Release 2.0.0 - UNRELEASED
|
||||||
MAPREDUCE-3955. Change MR to use ProtobufRpcEngine from hadoop-common
|
MAPREDUCE-3955. Change MR to use ProtobufRpcEngine from hadoop-common
|
||||||
instead of ProtoOverHadoopRpcEngine. (Jitendra Nath Pandey via sseth)
|
instead of ProtoOverHadoopRpcEngine. (Jitendra Nath Pandey via sseth)
|
||||||
|
|
||||||
|
MAPREDUCE-4103. Fix HA docs for changes to shell command fencer args (todd)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -322,13 +322,40 @@ HDFS High Availability
|
||||||
The string between '(' and ')' is passed directly to a bash shell and may not
|
The string between '(' and ')' is passed directly to a bash shell and may not
|
||||||
include any closing parentheses.
|
include any closing parentheses.
|
||||||
|
|
||||||
When executed, the first argument to the configured script will be the address
|
|
||||||
of the NameNode to be fenced, followed by all arguments specified in the
|
|
||||||
configuration.
|
|
||||||
|
|
||||||
The shell command will be run with an environment set up to contain all of the
|
The shell command will be run with an environment set up to contain all of the
|
||||||
current Hadoop configuration variables, with the '_' character replacing any
|
current Hadoop configuration variables, with the '_' character replacing any
|
||||||
'.' characters in the configuration keys. If the shell command returns an exit
|
'.' characters in the configuration keys. The configuration used has already had
|
||||||
|
any namenode-specific configurations promoted to their generic forms -- for example
|
||||||
|
<<dfs_namenode_rpc-address>> will contain the RPC address of the target node, even
|
||||||
|
though the configuration may specify that variable as
|
||||||
|
<<dfs.namenode.rpc-address.ns1.nn1>>.
|
||||||
|
|
||||||
|
Additionally, the following variables referring to the target node to be fenced
|
||||||
|
are also available:
|
||||||
|
|
||||||
|
*-----------------------:-----------------------------------+
|
||||||
|
| $target_host | hostname of the node to be fenced |
|
||||||
|
*-----------------------:-----------------------------------+
|
||||||
|
| $target_port | IPC port of the node to be fenced |
|
||||||
|
*-----------------------:-----------------------------------+
|
||||||
|
| $target_address | the above two, combined as host:port |
|
||||||
|
*-----------------------:-----------------------------------+
|
||||||
|
| $target_nameserviceid | the nameservice ID of the NN to be fenced |
|
||||||
|
*-----------------------:-----------------------------------+
|
||||||
|
| $target_namenodeid | the namenode ID of the NN to be fenced |
|
||||||
|
*-----------------------:-----------------------------------+
|
||||||
|
|
||||||
|
These environment variables may also be used as substitutions in the shell
|
||||||
|
command itself. For example:
|
||||||
|
|
||||||
|
---
|
||||||
|
<property>
|
||||||
|
<name>dfs.ha.fencing.methods</name>
|
||||||
|
<value>shell(/path/to/my/script.sh --nameservice=$target_nameserviceid $target_host:$target_port)</value>
|
||||||
|
</property>
|
||||||
|
---
|
||||||
|
|
||||||
|
If the shell command returns an exit
|
||||||
code of 0, the fencing is determined to be successful. If it returns any other
|
code of 0, the fencing is determined to be successful. If it returns any other
|
||||||
exit code, the fencing was not successful and the next fencing method in the
|
exit code, the fencing was not successful and the next fencing method in the
|
||||||
list will be attempted.
|
list will be attempted.
|
||||||
|
|
Loading…
Reference in New Issue