Преглед изворни кода

HDFS-10476. DiskBalancer: Plan command output directory should be a sub-directory. Contributed by Anu Engineer.

Anu Engineer пре 9 година
родитељ
комит
47dcb0f952

+ 2 - 2
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/Command.java

@@ -163,10 +163,10 @@ public abstract class Command extends Configured {
       if (getClusterURI().getScheme().startsWith("file")) {
         diskBalancerLogs = new Path(
             System.getProperty("user.dir") + DEFAULT_LOG_DIR.toString() +
-                format.format(now));
+                Path.SEPARATOR + format.format(now));
       } else {
         diskBalancerLogs = new Path(DEFAULT_LOG_DIR.toString() +
-            format.format(now));
+            Path.SEPARATOR + format.format(now));
       }
     } else {
       diskBalancerLogs = new Path(path);

+ 4 - 0
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DiskBalancer.java

@@ -216,6 +216,10 @@ public class DiskBalancer extends Configured implements Tool {
     Option help =
         new Option(HELP, true, "Help about a command or this message");
     opt.addOption(help);
+
+    Option verbose = new Option(VERBOSE, "Print out the summary of the plan");
+    opt.addOption(verbose);
+
   }
 
   /**