我想启用 spark.eventLog.compress
在emr集群中,在不丢失spark history服务器功能的情况下节省日志空间。我试过启用配置设置并提交一个基本步骤,但是当它打开时,历史服务器只显示“找不到已完成的应用程序!”。也没有发现不完整的应用程序。运行相同的群集 spark.eventLog.compress
设置为false将显示我期望的应用程序日志。
日志确实在那里并且被压缩了
scala> spark.conf.get("spark.history.fs.logDirectory")
res0: String = hdfs:///var/log/spark/apps
scala> :quit
[hadoop@ip-... ~]$ hadoop fs -ls hdfs:///var/log/spark/apps
Found 3 items
-rwxrwx--- 1 hadoop spark 24595 2020-12-07 22:26 hdfs:///var/log/spark/apps/application_1607379760026_0001_1.lz4
-rwxrwx--- 1 hadoop spark 17878 2020-12-07 22:26 hdfs:///var/log/spark/apps/application_1607379760026_0002.lz4
-rwxrwx--- 1 hadoop spark 12190 2020-12-07 22:44 hdfs:///var/log/spark/apps/application_1607379760026_0003.lz4
[hadoop@ip-... ~]$ logout
我还试着查看了 org.apache.spark.deploy.history.HistoryServer
过程(通过 ps aux | grep -i history
)按照这个答案
[hadoop@ip-... ~]$ sudo tail -f /proc/25275/fd/1
...
20/12/08 20:46:08 INFO FsHistoryProvider: Parsing hdfs://ip-...:8020/var/log/spark/apps/application_1607443436753_0002_1.lz4 to re-build UI...
20/12/08 20:46:08 INFO FsHistoryProvider: Finished parsing hdfs://ip-...:8020/var/log/spark/apps/application_1607443436753_0002_1.lz4
20/12/08 21:01:50 INFO FsHistoryProvider: Parsing hdfs://ip-...:8020/var/log/spark/apps/application_1607443436753_0003_1.lz4.inprogress for listing data...
20/12/08 21:01:50 INFO FsHistoryProvider: Finished parsing hdfs://ip-...:8020/var/log/spark/apps/application_1607443436753_0003_1.lz4.inprogress
20/12/08 21:02:00 INFO FsHistoryProvider: Parsing hdfs://ip-...:8020/var/log/spark/apps/application_1607443436753_0003_1.lz4 for listing data...
20/12/08 21:02:00 INFO FsHistoryProvider: Finished parsing hdfs://ip-...:8020/var/log/spark/apps/application_1607443436753_0003_1.lz4
在我看来,这似乎意味着历史服务器应该能够读取它们,但很难说我只是错过了一个错误消息还是什么。是否可以使用查看历史服务器中的日志 spark.eventLog.compress
启用?
暂无答案!
目前还没有任何答案,快来回答吧!