From c970f1d00525e4273075cff7406dcbd71305abd5 Mon Sep 17 00:00:00 2001 From: Kihwal Lee Date: Thu, 14 Apr 2016 12:45:47 -0500 Subject: [PATCH] HDFS-10280. Document new dfsadmin command -evictWriters. Contributed by Wei-Chiu Chuang. --- .../src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java | 4 ++++ .../hadoop-hdfs/src/site/markdown/HDFSCommands.md | 2 ++ 2 files changed, 6 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java index a35246f38b5..08d3da5405c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java @@ -427,6 +427,7 @@ public class DFSAdmin extends FsShell { "\t[-allowSnapshot ]\n" + "\t[-disallowSnapshot ]\n" + "\t[-shutdownDatanode [upgrade]]\n" + + "\t[-evictWriters ]\n" + "\t[-getDatanodeInfo ]\n" + "\t[-metasave filename]\n" + "\t[-triggerBlockReport [-incremental] ]\n" + @@ -1829,6 +1830,9 @@ public class DFSAdmin extends FsShell { } else if ("-shutdownDatanode".equals(cmd)) { System.err.println("Usage: hdfs dfsadmin" + " [-shutdownDatanode [upgrade]]"); + } else if ("-evictWriters".equals(cmd)) { + System.err.println("Usage: hdfs dfsadmin" + + " [-evictWriters ]"); } else if ("-getDatanodeInfo".equals(cmd)) { System.err.println("Usage: hdfs dfsadmin" + " [-getDatanodeInfo ]"); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md index 035abd63187..a6c8b4c4c9a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md +++ b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md @@ -385,6 +385,7 @@ Usage: hdfs dfsadmin [-allowSnapshot ] hdfs dfsadmin [-disallowSnapshot ] hdfs dfsadmin [-shutdownDatanode [upgrade]] + hdfs dfsadmin [-evictWriters ] hdfs dfsadmin [-getDatanodeInfo ] hdfs dfsadmin [-metasave filename] hdfs dfsadmin [-triggerBlockReport [-incremental] ] @@ -419,6 +420,7 @@ Usage: | `-allowSnapshot` \ | Allowing snapshots of a directory to be created. If the operation completes successfully, the directory becomes snapshottable. See the [HDFS Snapshot Documentation](./HdfsSnapshots.html) for more information. | | `-disallowSnapshot` \ | Disallowing snapshots of a directory to be created. All snapshots of the directory must be deleted before disallowing snapshots. See the [HDFS Snapshot Documentation](./HdfsSnapshots.html) for more information. | | `-shutdownDatanode` \ [upgrade] | Submit a shutdown request for the given datanode. See [Rolling Upgrade document](./HdfsRollingUpgrade.html#dfsadmin_-shutdownDatanode) for the detail. | +| `-evictWriters` \ | Make the datanode evict all clients that are writing a block. This is useful if decommissioning is hung due to slow writers. | | `-getDatanodeInfo` \ | Get the information about the given datanode. See [Rolling Upgrade document](./HdfsRollingUpgrade.html#dfsadmin_-getDatanodeInfo) for the detail. | | `-metasave` filename | Save Namenode's primary data structures to *filename* in the directory specified by hadoop.log.dir property. *filename* is overwritten if it exists. *filename* will contain one line for each of the following
1. Datanodes heart beating with Namenode
2. Blocks waiting to be replicated
3. Blocks currently being replicated
4. Blocks waiting to be deleted | | `-triggerBlockReport` `[-incremental]` \ | Trigger a block report for the given datanode. If 'incremental' is specified, it will be otherwise, it will be a full block report. |