当我提交作业时,我错误地使用了"hadoop-jar"而不是"hadoop.jar"。
在这种情况下,我的jar包不能不提交给集群,只能启动"本地jobrunner",这让我非常困惑。
有人知道原因吗?或者"hadoop-jar"one_answers"hadoop.jar"命令之间的区别?
谢谢!
/usr/bin/hadop-jar是hadoop的$HADOOP_HOME/bin/hadoop
脚本需要的参数,其中$hadoop_HOME是您保存hadoop相关文件的地方。
摘录自hadoop脚本
elif [ "$COMMAND" = "jar" ] ; then
CLASS=org.apache.hadoop.util.RunJar
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
和,
elif [[ "$COMMAND" = -* ]] ; then
# class and package names cannot begin with a -
echo "Error: No command named `$COMMAND' was found. Perhaps you meant `hadoop ${COMMAND#-}'"
exit 1
这里COMMAND="jar",当COMMAND=-*或-jar时,它应该抛出上面编码的异常。我不知道你怎么能经营一个本地罐子。