WARN yarn.Client: Neither spark.yarn.jars nor spark.yarn.archive is set, falling back to uploading l

19/05/15 11:29:42 WARN yarn.Client: Neither spark.yarn.jars nor spark.yarn.archive is set, falling back to uploading libraries under SPARK_HOME.

19/05/15 11:29:42 WARN yarn.Client: Neither spark.yarn.jars nor spark.yarn.archive is set, falling back to uploading libraries under SPARK_HOME.
19/05/15 11:29:47 INFO yarn.Client: Uploading resource file:/tmp/spark-e9b20474-6ae9-4958-9f14-fc06c70c341f/__spark_libs__8005289472593048.zip -> hdfs://hadoop004:9000/user/hadoop/.sparkStaging/application_1557890766782_0001/__spark_libs__8005289472593048.zip
19/05/15 11:29:48 INFO yarn.Client: Uploading resource file:/tmp/spark-e9b20474-6ae9-4958-9f14-fc06c70c341f/__spark_conf__1131806369668992833.zip -> hdfs://hadoop004:9000/user/hadoop/.sparkStaging/application_1557890766782_0001/__spark_conf__.zip

解决方法

[hadoop@hadoop004 conf]$ hdfs dfs -mkdir -p /home/hadoop/spark_jars


[hadoop@hadoop004 conf]$ hdfs dfs -ls /home/hadoop/
Found 1 items
drwxr-xr-x   - hadoop supergroup          0 2019-05-15 12:12 /home/hadoop/spark_jars

[hadoop@hadoop004 spark-2.3.3-bin-2.6.0-cdh5.7.0]$ pwd
/home/hadoop/app/spark-2.3.3-bin-2.6.0-cdh5.7.0

[hadoop@hadoop004 spark-2.3.3-bin-2.6.0-cdh5.7.0]$ ls
bin  conf  data  examples  jars  LICENSE  licenses  NOTICE  python  README.md  RELEASE  sbin  yarn

[hadoop@hadoop004 spark-2.3.3-bin-2.6.0-cdh5.7.0]$ hdfs dfs -put jars/* /home/hadoop/spark_jars/

[hadoop@hadoop004 spark-2.3.3-bin-2.6.0-cdh5.7.0]$ hdfs dfs -ls /home/hadoop/spark_jars/

[hadoop@hadoop004 conf]$ vim spark-defaults.conf

spark.yarn.jars hdfs://hadoop004:9000/home/hadoop/spark_jars/*

再提交一个作业检验

spark-submit \
--class com.ruozedata.spark.wc.WordCountApp \
--master yarn \
hdfs://hadoop004:9000/lib/spark-train-1.0.jar \
hdfs://hadoop004:9000/wc_input2 

 部分截图

19/05/15 12:30:57 INFO yarn.Client: Source and destination file systems are the same. Not copying hdfs://hadoop004:9000/home/hadoop/spark_jars/JavaEWAH-0.3.2.jar
19/05/15 12:30:58 INFO yarn.Client: Source and destination file systems are the same. Not copying hdfs://hadoop004:9000/home/hadoop/spark_jars/RoaringBitmap-0.5.11.jar
19/05/15 12:30:58 INFO yarn.Client: Source and destination file systems are the same. Not copying hdfs://hadoop004:9000/home/hadoop/spark_jars/ST4-4.0.4.jar
19/05/15 12:30:58 INFO yarn.Client: Source and destination file systems are the same. Not copying hdfs://hadoop004:9000/home/hadoop/spark_jars/activation-1.1.1.jar
19/05/15 12:30:58 INFO yarn.Client: Source and destination file systems are the same. Not copying hdfs://hadoop004:9000/home/hadoop/spark_jars/aircompressor-0.8.jar

成功!!

猜你喜欢

转载自blog.csdn.net/xiaoxiongaa0/article/details/90233687
今日推荐