diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index f3a02377d9a..1a8c41d0993 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -138,6 +138,9 @@ Trunk (Unreleased) HADOOP-11025. hadoop-daemons.sh should just call hdfs directly (Masatake Iwasaki via aw) + HADOOP-11150. hadoop command should show the reason on failure by + invalid COMMAND or CLASSNAME (Masatake Iwasaki via aw) + BUG FIXES HADOOP-9451. Fault single-layer config if node group topology is enabled. diff --git a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh index 4f75a7ccf5e..b5d4b1c12bd 100644 --- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh +++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh @@ -286,6 +286,9 @@ function hadoop_validate_classname shift 1 if [[ ! ${class} =~ \. ]]; then + # assuming the arg is typo of command if it does not conatain ".". + # class belonging to no package is not allowed as a result. + hadoop_error "ERROR: ${class} is not COMMAND nor fully qualified CLASSNAME." return 1 fi return 0