From 01b4126b4e8124edfde20ba4733c6300bb994251 Mon Sep 17 00:00:00 2001 From: Takanobu Asanuma Date: Sun, 16 Dec 2018 00:40:51 +0900 Subject: [PATCH] HDFS-14152. RBF: Fix a typo in RouterAdmin usage. Contributed by Ayush Saxena. --- .../org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java | 2 +- .../hdfs/server/federation/router/TestRouterAdminCLI.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java index 4a9cc7ac51..bdaabe821f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java @@ -109,7 +109,7 @@ private String getUsage(String cmd) { {"-add", "-update", "-rm", "-ls", "-setQuota", "-clrQuota", "-safemode", "-nameservice", "-getDisabledNameservices"}; StringBuilder usage = new StringBuilder(); - usage.append("Usage: hdfs routeradmin :\n"); + usage.append("Usage: hdfs dfsrouteradmin :\n"); for (int i = 0; i < commands.length; i++) { usage.append(getUsage(commands[i])); if (i + 1 < commands.length) { diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterAdminCLI.java b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterAdminCLI.java index 66429420ab..d0e3e50fce 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterAdminCLI.java +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterAdminCLI.java @@ -549,7 +549,7 @@ public void testInvalidArgumentMessage() throws Exception { argv = new String[] {"-Random"}; assertEquals(-1, ToolRunner.run(admin, argv)); - String expected = "Usage: hdfs routeradmin :\n" + String expected = "Usage: hdfs dfsrouteradmin :\n" + "\t[-add " + "[-readonly] [-order HASH|LOCAL|RANDOM|HASH_ALL] " + "-owner -group -mode ]\n"