HeartSaVioR commented on a change in pull request #26416: [SPARK-29779][CORE]
Compact old event log files and cleanup
URL: https://github.com/apache/spark/pull/26416#discussion_r346650541
##########
File path:
core/src/test/scala/org/apache/spark/deploy/history/EventLogTestHelper.scala
##########
@@ -56,4 +61,23 @@ object EventLogTestHelper {
eventStr
}
}
+
+ def writeEventLogFile(
+ sparkConf: SparkConf,
+ hadoopConf: Configuration,
+ dir: File,
+ idx: Int,
+ events: Seq[SparkListenerEvent]): String = {
+ // to simplify the code, we don't concern about file name being matched
with the naming rule
+ // of event log file
+ val writer = new SingleEventLogFileWriter(s"app$idx", None, dir.toURI,
sparkConf, hadoopConf)
+ writer.start()
+ events.foreach { event => writer.writeEvent(convertEvent(event),
flushLogger = true) }
Review comment:
same here.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]