diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 0d80d0fe67c..58db84448f7 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -263,6 +263,9 @@ Release 2.0.1-alpha - UNRELEASED HADOOP-8749. HADOOP-8031 changed the way in which relative xincludes are handled in Configuration. (ahmed via tucu) + HADOOP-8431. Running distcp wo args throws IllegalArgumentException. + (Sandy Ryza via eli) + BREAKDOWN OF HDFS-3042 SUBTASKS HADOOP-8220. ZKFailoverController doesn't handle failure to become active diff --git a/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java b/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java index 416847b821d..e507c7a8c5b 100644 --- a/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java +++ b/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java @@ -98,6 +98,11 @@ public class DistCp extends Configured implements Tool { * @return On success, it returns 0. Else, -1. */ public int run(String[] argv) { + if (argv.length < 1) { + OptionsParser.usage(); + return DistCpConstants.INVALID_ARGUMENT; + } + try { inputOptions = (OptionsParser.parse(argv));