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 4b50534475..b39ed96037 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 @@ -127,7 +127,7 @@ private String getUsage(String cmd) { {"-add", "-update", "-rm", "-ls", "-getDestination", "-setQuota", "-clrQuota", "-safemode", "-nameservice", "-getDisabledNameservices", - "-refresh"}; + "-refresh", "-refreshRouterArgs"}; StringBuilder usage = new StringBuilder(); usage.append("Usage: hdfs dfsrouteradmin :\n"); for (int i = 0; i < commands.length; i++) { 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 5a20a7094e..731d5d4560 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 @@ -576,6 +576,12 @@ public void testInvalidArgumentMessage() throws Exception { assertTrue(out.toString().contains("\t[-getDestination ]")); out.reset(); + argv = new String[] {"-refreshRouterArgs"}; + assertEquals(-1, ToolRunner.run(admin, argv)); + assertTrue(out.toString().contains("\t[-refreshRouterArgs " + + " [arg1..argn]]")); + out.reset(); + argv = new String[] {"-Random"}; assertEquals(-1, ToolRunner.run(admin, argv)); String expected = "Usage: hdfs dfsrouteradmin :\n" @@ -594,7 +600,9 @@ public void testInvalidArgumentMessage() throws Exception { + "]\n" + "\t[-clrQuota ]\n" + "\t[-safemode enter | leave | get]\n" + "\t[-nameservice enable | disable ]\n" - + "\t[-getDisabledNameservices]"; + + "\t[-getDisabledNameservices]\n" + + "\t[-refresh]\n" + + "\t[-refreshRouterArgs [arg1..argn]]"; assertTrue("Wrong message: " + out, out.toString().contains(expected)); out.reset(); }