Author: todd
Date: Wed Apr 4 18:46:22 2012
New Revision: 1309533
URL: http://svn.apache.org/viewvc?rev=1309533&view=rev
Log:
MAPREDUCE-4103. Fix HA docs for changes to shell command fencer args. Contributed by Todd
Lipcon.
Modified:
hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/HDFSHighAvailability.apt.vm
Modified: hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt?rev=1309533&r1=1309532&r2=1309533&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt Wed Apr 4 18:46:22 2012
@@ -139,6 +139,8 @@ Release 2.0.0 - UNRELEASED
MAPREDUCE-3955. Change MR to use ProtobufRpcEngine from hadoop-common
instead of ProtoOverHadoopRpcEngine. (Jitendra Nath Pandey via sseth)
+ MAPREDUCE-4103. Fix HA docs for changes to shell command fencer args (todd)
+
OPTIMIZATIONS
BUG FIXES
Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/HDFSHighAvailability.apt.vm
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/HDFSHighAvailability.apt.vm?rev=1309533&r1=1309532&r2=1309533&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/HDFSHighAvailability.apt.vm
(original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/HDFSHighAvailability.apt.vm
Wed Apr 4 18:46:22 2012
@@ -322,13 +322,40 @@ HDFS High Availability
The string between '(' and ')' is passed directly to a bash shell and may not
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
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
exit code, the fencing was not successful and the next fencing method in the
list will be attempted.
|