使用的Hadoop版本是2.7.3 HDFS端口号9000
192.168.x.x是Hadoop的namenode节点IP地址
18080是默认的历史日志的端口号
spark.yarn.historyServer.address=192.168.x.x:18080
spark.history.ui.port=18080
spark.eventLog.enabled true
spark.eventLog.dir hdfs://192.168.x.x:9000/spark/tmp/history
spark.history.fs.logDirectory hdfs://192.168.x.x:9000/spark/tmp/history
spark.eventLog.compress true
加密之后的日志文件会被加密为.lz4文件
打开浏览器
192.168.x.x:18080
hdfs dfs -ls /spark/tmp/history/
hdfs dfs -cat /spark/tmp/history/spark-xxxx