HADOOP-8431. Running distcp wo args throws IllegalArgumentException. Contributed by Sandy Ryza

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1381840 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eli Collins 2012-09-07 01:25:30 +00:00
parent e4679b5caf
commit 404ab8ec66
2 changed files with 8 additions and 0 deletions

View File

@ -476,6 +476,9 @@ Branch-2 ( Unreleased changes )
HADOOP-8749. HADOOP-8031 changed the way in which relative xincludes are handled in HADOOP-8749. HADOOP-8031 changed the way in which relative xincludes are handled in
Configuration. (ahmed via tucu) Configuration. (ahmed via tucu)
HADOOP-8431. Running distcp wo args throws IllegalArgumentException.
(Sandy Ryza via eli)
BREAKDOWN OF HDFS-3042 SUBTASKS BREAKDOWN OF HDFS-3042 SUBTASKS
HADOOP-8220. ZKFailoverController doesn't handle failure to become active HADOOP-8220. ZKFailoverController doesn't handle failure to become active

View File

@ -98,6 +98,11 @@ private DistCp() {}
* @return On success, it returns 0. Else, -1. * @return On success, it returns 0. Else, -1.
*/ */
public int run(String[] argv) { public int run(String[] argv) {
if (argv.length < 1) {
OptionsParser.usage();
return DistCpConstants.INVALID_ARGUMENT;
}
try { try {
inputOptions = (OptionsParser.parse(argv)); inputOptions = (OptionsParser.parse(argv));