shuyouZZ commented on code in PR #41491: URL: https://github.com/apache/spark/pull/41491#discussion_r1222866586
########## core/src/main/scala/org/apache/spark/deploy/history/EventLogFileCompactor.scala: ########## @@ -221,5 +222,15 @@ private class CompactedEventLogFileWriter( hadoopConf: Configuration) extends SingleEventLogFileWriter(appId, appAttemptId, logBaseDir, sparkConf, hadoopConf) { - override val logPath: String = originalFilePath.toUri.toString + EventLogFileWriter.COMPACTED + override val shouldCompress = EventLogFileWriter.codecName(originalFilePath).isDefined + + override val compressionCodec = + if (shouldCompress) { + val originalCodecName = EventLogFileWriter.codecName(originalFilePath).getOrElse("") + Some(CompressionCodec.createCodec(sparkConf, originalCodecName)) + } else { + None + } + + override def logPath: String = originalFilePath.toUri.toString + EventLogFileWriter.COMPACTED Review Comment: > ~Since this is not changed, please put this before all new additions. I guess that will reduce your PR's diff.~ Is this changed from `val` to `def`? Here is an example, it reproduce and explain why is my abstract or overridden val null. https://docs.scala-lang.org/tutorials/FAQ/initialization-order.html -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org