我试图提交Spark提交,但它作为奇怪的消息失败。
Error: Could not find or load main class org.apache.spark.launcher.Main
/opt/spark/bin/spark-class: line 96: CMD: bad array subscript
这是我第一次看到这种错误。我试图检查spark类文件的代码,但无法解释是什么导致了这个问题。
# Turn off posix mode since it does not allow process substitution
set +o posix
CMD=()
DELIM=$'\n'
CMD_START_FLAG="false"
while IFS= read -d "$DELIM" -r ARG; do
if [ "$CMD_START_FLAG" == "true" ]; then
CMD+=("$ARG")
else
if [ "$ARG" == $'\0' ]; then
# After NULL character is consumed, change the delimiter and consume command string.
DELIM=''
CMD_START_FLAG="true"
elif [ "$ARG" != "" ]; then
echo "$ARG"
fi
fi
done < <(build_command "$@")
COUNT=${#CMD[@]}
LAST=$((COUNT - 1))
LAUNCHER_EXIT_CODE=${CMD[$LAST]}
错误消息中提到的行是
LAUNCHER_EXIT_CODE=${CMD[$LAST]}
任何关于这个问题的指示或想法都会对我有很大帮助。
谢谢
暂无答案!
目前还没有任何答案,快来回答吧!