Warning: Local jar /data/myProject/4 does not exist, skipping報錯
最近shell指令碼寫spark指令碼:
$SPARK_BIN --master yarn-client --name openrc_${bid}_${model}[email protected]${running_id} --queue ${queue} \
--class com.tencent.dp.gr.driver.CTR1 \
--conf spark.hadoop.fs.hdfs.impl.disable.cache=true \
--num-executors ${node_num} \
--executor-cores ${worker_num_per_node} \
--driver-memory ${drv_mem} \
--executor-memory ${exe_mem} \
--conf spark.yarn.executor.memoryOverhead=2048 \
--conf spark.dynamicAllocation.enable=false \
/data/home/star/openrcTraining-1.0-SNAPSHOT-jar-with-dependencies.jar \
執行後出現報錯:
Warning: Local jar /data/home/star/4 does not exist, skipping.
java.lang.ClassNotFoundException: com.tencent.dp.gr.driver.CTR1
at java.lang.ClassLoader.findClass(ClassLoader.java:531)
at org.apache.spark.util.ParentClassLoader.findClass(ParentClassLoader.scala:26)
檢查了路徑是沒有問題的,以為是jar包的問題,改了很多次還是解決不了。
最後發現,是--num-executors引數 node_num沒有定義。最後發現真相的我眼淚掉下來……不過這個報錯也真的是沒誰了
Mark一下,以志教訓!