Spark 学习笔记之 Spark history Server 搭建

在hdfs上建立文件夹/directory

hadoop fs -mkdir /directory

进入conf目录 

spark-env.sh 增加以下配置

export SPARK_HISTORY_OPTS="-Dspark.history.ui.port=7777 -Dspark.history.retainedApplications=3 -Dspark.history.fs.logDirectory=hdfs://bjsxt/directory"

spark-defaults.conf 增加以下配置

spark.eventLog.enabled true
spark.eventLog.dir hdfs://bjsxt/directory
spark.eventLog.compress true

在sbin/目录下启动./start-history-server.sh

现在可以访问spark history log了!

原文地址:https://www.cnblogs.com/AK47Sonic/p/7148338.html