-
- Downloads
[SPARK-6066] Make event log format easier to parse
Some users have reported difficulty in parsing the new event log format. Since we embed the metadata in the beginning of the file, when we compress the event log we need to skip the metadata because we need that information to parse the log later. This means we'll end up with a partially compressed file if event logging compression is turned on. The old format looks like: ``` sparkVersion = 1.3.0 compressionCodec = org.apache.spark.io.LZFCompressionCodec === LOG_HEADER_END === // actual events, could be compressed bytes ``` The new format in this patch puts the compression codec in the log file name instead. It also removes the metadata header altogether along with the Spark version, which was not needed. The new file name looks something like: ``` app_without_compression app_123.lzf app_456.snappy ``` I tested this with and without compression, using different compression codecs and event logging directories. I verified that both the `Master` and the `HistoryServer` can render both compressed and uncompressed logs as before. Author: Andrew Or <andrew@databricks.com> Closes #4821 from andrewor14/event-log-format and squashes the following commits: 8511141 [Andrew Or] Fix test 654883d [Andrew Or] Add back metadata with Spark version 7f537cd [Andrew Or] Address review feedback 7d6aa61 [Andrew Or] Make codec an extension 59abee9 [Andrew Or] Merge branch 'master' of github.com:apache/spark into event-log-format 27c9a6c [Andrew Or] Address review feedback 519e51a [Andrew Or] Address review feedback ef69276 [Andrew Or] Merge branch 'master' of github.com:apache/spark into event-log-format 88a091d [Andrew Or] Add tests for new format and file name f32d8d2 [Andrew Or] Fix tests 8db5a06 [Andrew Or] Embed metadata in the event log file name instead
Showing
- core/src/main/scala/org/apache/spark/SparkContext.scala 9 additions, 0 deletionscore/src/main/scala/org/apache/spark/SparkContext.scala
- core/src/main/scala/org/apache/spark/deploy/ApplicationDescription.scala 7 additions, 3 deletions...cala/org/apache/spark/deploy/ApplicationDescription.scala
- core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala 8 additions, 14 deletions...a/org/apache/spark/deploy/history/FsHistoryProvider.scala
- core/src/main/scala/org/apache/spark/deploy/master/Master.scala 4 additions, 4 deletions...rc/main/scala/org/apache/spark/deploy/master/Master.scala
- core/src/main/scala/org/apache/spark/io/CompressionCodec.scala 19 additions, 2 deletions...src/main/scala/org/apache/spark/io/CompressionCodec.scala
- core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala 58 additions, 104 deletions...ala/org/apache/spark/scheduler/EventLoggingListener.scala
- core/src/main/scala/org/apache/spark/scheduler/ReplayListenerBus.scala 1 addition, 2 deletions.../scala/org/apache/spark/scheduler/ReplayListenerBus.scala
- core/src/main/scala/org/apache/spark/scheduler/SparkListener.scala 5 additions, 0 deletions...main/scala/org/apache/spark/scheduler/SparkListener.scala
- core/src/main/scala/org/apache/spark/scheduler/SparkListenerBus.scala 1 addition, 0 deletions...n/scala/org/apache/spark/scheduler/SparkListenerBus.scala
- core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala 1 addition, 1 deletion...spark/scheduler/cluster/SparkDeploySchedulerBackend.scala
- core/src/main/scala/org/apache/spark/util/JsonProtocol.scala 14 additions, 0 deletionscore/src/main/scala/org/apache/spark/util/JsonProtocol.scala
- core/src/test/scala/org/apache/spark/deploy/history/FsHistoryProviderSuite.scala 43 additions, 26 deletions.../apache/spark/deploy/history/FsHistoryProviderSuite.scala
- core/src/test/scala/org/apache/spark/scheduler/EventLoggingListenerSuite.scala 39 additions, 23 deletions...rg/apache/spark/scheduler/EventLoggingListenerSuite.scala
- core/src/test/scala/org/apache/spark/scheduler/ReplayListenerSuite.scala 3 additions, 10 deletions...cala/org/apache/spark/scheduler/ReplayListenerSuite.scala
Loading
Please register or sign in to comment