spark on yarn 配置history server
spark在yarn模式下配置history server
1、建立hdfs文件
– hadoop fs -mkdir /user/spark
– hadoop fs -mkdir /user/spark/eventlog
– hdfs hadoop fs -chown -R spark:spark /user/spark
– hadoop fs -chmod 1777 /user/spark/
2、history server节点上的配置
在spark-defaults.conf中加入以下配置
spark.yarn.historyServer.address master:18080
spark.history.fs.logDirectory hdfs://localhost:9000/user/spark/eventlog
3、在提交机节点上的spark-defaults.conf中加入以下配置
spark.eventLog.enabled true
spark.eventLog.dir hdfs://localhost:9000/user/spark/eventlog