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 4b505344751..b39ed96037f 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 @@ public class RouterAdmin extends Configured implements Tool { {"-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 5a20a7094e3..731d5d45608 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 class TestRouterAdminCLI { 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 class TestRouterAdminCLI { + "]\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(); }