HADOOP-11150. hadoop command should show the reason on failure by invalid COMMAND or CLASSNAME (Masatake Iwasaki via aw)

This commit is contained in:
Allen Wittenauer 2014-11-13 12:08:03 -08:00
parent b650e61a7f
commit aee68b67f3
2 changed files with 6 additions and 0 deletions

View File

@ -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.

View File

@ -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