HDFS-7736. Fix typos in dfsadmin/fsck/snapshotDiff usage messages. Contributed by Brahma Reddy Battula.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f80c9888 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f80c9888 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f80c9888 Branch: refs/heads/YARN-2928 Commit: f80c9888fa0c1a11967560be3c37dfc1e30da2c3 Parents: 078f3a9 Author: Haohui Mai <whe...@apache.org> Authored: Wed Feb 11 11:21:33 2015 -0800 Committer: Haohui Mai <whe...@apache.org> Committed: Wed Feb 11 11:21:33 2015 -0800 ---------------------------------------------------------------------- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/hdfs/server/mover/Mover.java | 4 ++-- .../main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java | 10 +++++----- .../src/main/java/org/apache/hadoop/hdfs/tools/DFSck.java | 2 +- .../hadoop/hdfs/tools/snapshot/LsSnapshottableDir.java | 2 +- .../apache/hadoop/hdfs/tools/snapshot/SnapshotDiff.java | 2 +- 6 files changed, 13 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/f80c9888/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index d60a20f..dd90c86 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -915,6 +915,9 @@ Release 2.7.0 - UNRELEASED HDFS-7753. Fix Multithreaded correctness Warnings in BackupImage. (Rakesh R and shv) + HDFS-7736. Fix typos in dfsadmin/fsck/snapshotDiff usage messages. + (Brahma Reddy Battula via wheat9) + Release 2.6.1 - UNRELEASED INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/f80c9888/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/mover/Mover.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/mover/Mover.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/mover/Mover.java index 6fa6963..346d511 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/mover/Mover.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/mover/Mover.java @@ -560,8 +560,8 @@ public class Mover { } static class Cli extends Configured implements Tool { - private static final String USAGE = "Usage: java " - + Mover.class.getSimpleName() + " [-p <files/dirs> | -f <local file>]" + private static final String USAGE = "Usage: hdfs mover " + + "[-p <files/dirs> | -f <local file>]" + "\n\t-p <files/dirs>\ta space separated list of HDFS files/dirs to migrate." + "\n\t-f <local file>\ta local file containing a list of HDFS files/dirs to migrate."; http://git-wip-us.apache.org/repos/asf/hadoop/blob/f80c9888/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java ---------------------------------------------------------------------- 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 77c77fe..ae9088c 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 @@ -545,7 +545,7 @@ public class DFSAdmin extends FsShell { /** * Safe mode maintenance command. - * Usage: java DFSAdmin -safemode [enter | leave | get] + * Usage: hdfs dfsadmin -safemode [enter | leave | get] * @param argv List of of command line parameters. * @param idx The index of the command that is being processed. * @exception IOException if the filesystem does not exist. @@ -661,7 +661,7 @@ public class DFSAdmin extends FsShell { /** * Allow snapshot on a directory. - * Usage: java DFSAdmin -allowSnapshot snapshotDir + * Usage: hdfs dfsadmin -allowSnapshot snapshotDir * @param argv List of of command line parameters. * @exception IOException */ @@ -677,7 +677,7 @@ public class DFSAdmin extends FsShell { /** * Allow snapshot on a directory. - * Usage: java DFSAdmin -disallowSnapshot snapshotDir + * Usage: hdfs dfsadmin -disallowSnapshot snapshotDir * @param argv List of of command line parameters. * @exception IOException */ @@ -1585,7 +1585,7 @@ public class DFSAdmin extends FsShell { System.err.println("Usage: hdfs dfsadmin" + " [-refreshCallQueue]"); } else if ("-reconfig".equals(cmd)) { - System.err.println("Usage: java DFSAdmin" + System.err.println("Usage: hdfs dfsadmin" + " [-reconfig <datanode|...> <host:port> <start|status>]"); } else if ("-refresh".equals(cmd)) { System.err.println("Usage: hdfs dfsadmin" @@ -1612,7 +1612,7 @@ public class DFSAdmin extends FsShell { System.err.println("Usage: hdfs dfsadmin" + " [-getDatanodeInfo <datanode_host:ipc_port>]"); } else if ("-triggerBlockReport".equals(cmd)) { - System.err.println("Usage: java DFSAdmin" + System.err.println("Usage: hdfs dfsadmin" + " [-triggerBlockReport [-incremental] <datanode_host:ipc_port>]"); } else { System.err.println("Usage: hdfs dfsadmin"); http://git-wip-us.apache.org/repos/asf/hadoop/blob/f80c9888/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSck.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSck.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSck.java index 98f2030..8c934c2 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSck.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSck.java @@ -75,7 +75,7 @@ public class DFSck extends Configured implements Tool { HdfsConfiguration.init(); } - private static final String USAGE = "Usage: DFSck <path> " + private static final String USAGE = "Usage: hdfs fsck <path> " + "[-list-corruptfileblocks | " + "[-move | -delete | -openforwrite] " + "[-files [-blocks [-locations | -racks]]]] " http://git-wip-us.apache.org/repos/asf/hadoop/blob/f80c9888/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/snapshot/LsSnapshottableDir.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/snapshot/LsSnapshottableDir.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/snapshot/LsSnapshottableDir.java index b2b9ce1..2f030b4 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/snapshot/LsSnapshottableDir.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/snapshot/LsSnapshottableDir.java @@ -37,7 +37,7 @@ import org.apache.hadoop.util.ToolRunner; public class LsSnapshottableDir extends Configured implements Tool { @Override public int run(String[] argv) throws Exception { - String description = "LsSnapshottableDir: \n" + + String description = "hdfs lsSnapshottableDir: \n" + "\tGet the list of snapshottable directories that are owned by the current user.\n" + "\tReturn all the snapshottable directories if the current user is a super user.\n"; http://git-wip-us.apache.org/repos/asf/hadoop/blob/f80c9888/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/snapshot/SnapshotDiff.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/snapshot/SnapshotDiff.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/snapshot/SnapshotDiff.java index 21c63ba..b87d69f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/snapshot/SnapshotDiff.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/snapshot/SnapshotDiff.java @@ -61,7 +61,7 @@ public class SnapshotDiff extends Configured implements Tool { @Override public int run(String[] argv) throws Exception { - String description = "SnapshotDiff <snapshotDir> <from> <to>:\n" + + String description = "hdfs snapshotDiff <snapshotDir> <from> <to>:\n" + "\tGet the difference between two snapshots, \n" + "\tor between a snapshot and the current tree of a directory.\n" + "\tFor <from>/<to>, users can use \".\" to present the current status,\n" +