spark.yarn.archive 的設置方法有很多,下面三種
①spark.yarn.jars hdfs://Desktop:9000/spark/jars/*
②spark.yarn.jars hdfs://Desktop:9000/spark/jars/*.jar
③spark.yarn.jars hdfs://Desktop:9000/spark/jars/
上述配置真的正確嗎?我們測試下
pyspark --master yarn
其中③會出現報錯:
Error: Could not find or load main class org.apache.spark.deploy.yarn.ExecutorLauncher
結論:
可行的方式只有①②