一:History日志聚合的配置
1.介紹
Spark的日志聚合功能不是standalone模式獨享的,是所有運行模式下都會存在的情況
默認情況下歷史日志是保存到tmp文件夾中的
2.參考官網的知識點位置

3.修改spark-defaults.conf

4.修改env.sh

5.在HDFS上新建/spark-history
bin/hdfs dfs -mkdir /spark-history
6.啟動歷史服務
sbin/start-history-server.sh

7.測試
webUI: http://192.168.187.146:18080/
local模式:bin/spark-shell
standalone模式:bin/spark-shell --master spark://linux-hadoop3.ibeifeng.com:7070
8.local模式的測試
bin/spark-shell
然后輸入程序。
在

9.standalone模式
bin/spark-shell --master spark://linux-hadoop3.ibeifeng.com:7070
輸入程序

二:RestApi
返回應用程序的執行結果。
1.關於RestApi的官網
也是屬於monitor的部分

2.介紹
專門用於獲取歷史應用的執行結果
用法: http://<server-url>:18080/api/v1
3.使用
http://linux-hadoop3.ibeifeng.com:18080/api/v1/applications

4.進一步使用
http://linux-hadoop3.ibeifeng.com:18080/api/v1/applications/app-20170206042834-0000/jobs

