HDFS-10496. DiskBalancer: ExecuteCommand checks planFile in a wrong way. 
Contributed by Lei (Eddy) Xu.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d2ff793a
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d2ff793a
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d2ff793a

Branch: refs/heads/trunk
Commit: d2ff793ae4788418116b64e7141e80897d4f9c24
Parents: 64ccb23
Author: Anu Engineer <aengin...@apache.org>
Authored: Tue Jun 7 15:10:22 2016 -0700
Committer: Arpit Agarwal <a...@apache.org>
Committed: Thu Jun 23 18:21:08 2016 -0700

----------------------------------------------------------------------
 .../hadoop/hdfs/server/diskbalancer/command/ExecuteCommand.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d2ff793a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/ExecuteCommand.java
----------------------------------------------------------------------
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/ExecuteCommand.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/ExecuteCommand.java
index c17ef00..6d30e86 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/ExecuteCommand.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/ExecuteCommand.java
@@ -61,7 +61,7 @@ public class ExecuteCommand extends Command {
     verifyCommandOptions(DiskBalancer.EXECUTE, cmd);
 
     String planFile = cmd.getOptionValue(DiskBalancer.EXECUTE);
-    Preconditions.checkArgument(planFile == null || planFile.isEmpty(),
+    Preconditions.checkArgument(planFile != null && !planFile.isEmpty(),
         "Invalid plan file specified.");
 
     String planData = null;


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to