yarn.Client: Neither spark.yarn.jars nor spark.yarn.archive is set

1. hdfs dfs -mkdir   /spark_jars

yarn.Client: Neither spark.yarn.jars nor spark.yarn.archive is set

2.hdfs dfs -put /usr/local/spark-2.2.1/examples/jars/spark-examples_2.11-2.2.1.jar    /spark_jars

yarn.Client: Neither spark.yarn.jars nor spark.yarn.archive is set

 

3.cp spark-defaults.conf.template spark-defaults.confyarn.Client: Neither spark.yarn.jars nor spark.yarn.archive is set

4.sudo vim spark-defaults.conf

yarn.Client: Neither spark.yarn.jars nor spark.yarn.archive is set

5.添加如下内容:spark.yarn.jars=hdfs://master:9000/spark_jars/*

yarn.Client: Neither spark.yarn.jars nor spark.yarn.archive is set