This is an automated email from the ASF dual-hosted git repository.
inigoiri pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 321a4844ad8 HADOOP-18314. Add some description for PowerShellFencer.
(#4505)
321a4844ad8 is described below
commit 321a4844ad8fe935ef6ad76792a2b250610c05ef
Author: jianghuazhu <[email protected]>
AuthorDate: Wed Jun 29 10:06:39 2022 +0800
HADOOP-18314. Add some description for PowerShellFencer. (#4505)
---
.../main/java/org/apache/hadoop/ha/NodeFencer.java | 1 +
.../org/apache/hadoop/ha/PowerShellFencer.java | 4 ++++
.../src/main/resources/core-default.xml | 2 +-
.../site/markdown/HDFSHighAvailabilityWithNFS.md | 26 +++++++++++++++++++---
.../site/markdown/HDFSHighAvailabilityWithQJM.md | 24 ++++++++++++++++++--
5 files changed, 51 insertions(+), 6 deletions(-)
diff --git
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/NodeFencer.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/NodeFencer.java
index fb78a4c47dc..f42db1d0c55 100644
---
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/NodeFencer.java
+++
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/NodeFencer.java
@@ -48,6 +48,7 @@ import org.slf4j.LoggerFactory;
* <ul>
* <li><code>shell(/path/to/some/script.sh args...)</code></li>
* <li><code>sshfence(...)</code> (see {@link SshFenceByTcpPort})
+ * <li><code>powershell(...)</code> (see {@link PowerShellFencer})
* </ul>
*/
@InterfaceAudience.Private
diff --git
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/PowerShellFencer.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/PowerShellFencer.java
index 6de618c8fcc..47e526f65e6 100644
---
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/PowerShellFencer.java
+++
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/PowerShellFencer.java
@@ -34,6 +34,10 @@ import org.slf4j.LoggerFactory;
* Fencer method that uses PowerShell to remotely connect to a machine and kill
* the required process. This only works in Windows.
*
+ * Fencing method uses PowerShell command. It should be specified
+ * in the fencing configuration like:<br>
+ * <code>powershell(NameNode)</code>
+ *
* The argument passed to this fencer should be a unique string in the
* "CommandLine" attribute for the "java.exe" process. For example, the full
* path for the Namenode: "org.apache.hadoop.hdfs.server.namenode.NameNode".
diff --git
a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
index 85138611c3b..5a1c09f0141 100644
--- a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
+++ b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
@@ -2930,7 +2930,7 @@ The switch to turn S3A auditing on or off.
<value></value>
<description>
List of fencing methods to use for service fencing. May contain
- builtin methods (eg shell and sshfence) or user-defined method.
+ builtin methods (eg shell, sshfence and powershell) or user-defined method.
</description>
</property>
diff --git
a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSHighAvailabilityWithNFS.md
b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSHighAvailabilityWithNFS.md
index 06cda83651e..df1ab68afca 100644
---
a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSHighAvailabilityWithNFS.md
+++
b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSHighAvailabilityWithNFS.md
@@ -192,8 +192,8 @@ The order in which you set these configurations is
unimportant, but the values y
terminated, before transitioning another NameNode to the Active state. In
order to do this, you must configure at least one **fencing method.**
These are
configured as a carriage-return-separated list, which will be attempted in
order
- until one indicates that fencing has succeeded. There are two methods which
- ship with Hadoop: *shell* and *sshfence*. For information on implementing
+ until one indicates that fencing has succeeded. There are three methods
which
+ ship with Hadoop: *shell*, *sshfence* and *powershell*. For information on
implementing
your own custom fencing method, see the *org.apache.hadoop.ha.NodeFencer*
class.
- - -
@@ -283,7 +283,27 @@ The order in which you set these configurations is
unimportant, but the values y
a subshell to kill its parent in some number of seconds).
- - -
-
+
+ **powershell** - use PowerShell to remotely connect to a machine and kill
+ the required process
+
+ The *powershell* fencing method uses PowerShell command. It may be
+ configured like so:
+
+ <property>
+ <name>dfs.ha.fencing.methods</name>
+ <value>powershell(NameNode)</value>
+ </property>
+
+ The argument passed to this fencer should be a unique string in the
"CommandLine"
+ attribute for the "java.exe" process. For example, the full path for the
Namenode:
+ "org.apache.hadoop.hdfs.server.namenode.NameNode".
+ The administrator can also shorten the name to "Namenode" if it's unique.
+
+ **Note:** This only works in Windows.
+
+ - - -
+
* **fs.defaultFS** - the default path prefix used by the Hadoop FS client
when none is given
Optionally, you may now configure the default path for Hadoop clients to
use
diff --git
a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSHighAvailabilityWithQJM.md
b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSHighAvailabilityWithQJM.md
index 4bb5971107e..6bdd4e1c529 100644
---
a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSHighAvailabilityWithQJM.md
+++
b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSHighAvailabilityWithQJM.md
@@ -239,8 +239,8 @@ The order in which you set these configurations is
unimportant, but the values y
The fencing methods used during a failover are configured as a
carriage-return-separated list, which will be attempted in order until
- one indicates that fencing has succeeded. There are two methods which ship
with
- Hadoop: *shell* and *sshfence*. For information on implementing your own
custom
+ one indicates that fencing has succeeded. There are three methods which
ship with
+ Hadoop: *shell*, *sshfence* and *powershell*. For information on
implementing your own custom
fencing method, see the *org.apache.hadoop.ha.NodeFencer* class.
- - -
@@ -331,6 +331,26 @@ The order in which you set these configurations is
unimportant, but the values y
- - -
+ **powershell** - use PowerShell to remotely connect to a machine and kill
+ the required process
+
+ The *powershell* fencing method uses PowerShell command. It may be
+ configured like so:
+
+ <property>
+ <name>dfs.ha.fencing.methods</name>
+ <value>powershell(NameNode)</value>
+ </property>
+
+ The argument passed to this fencer should be a unique string in the
"CommandLine"
+ attribute for the "java.exe" process. For example, the full path for the
Namenode:
+ "org.apache.hadoop.hdfs.server.namenode.NameNode".
+ The administrator can also shorten the name to "Namenode" if it's unique.
+
+ **Note:** This only works in Windows.
+
+ - - -
+
* **fs.defaultFS** - the default path prefix used by the Hadoop FS client
when none is given
Optionally, you may now configure the default path for Hadoop clients to
use
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]