spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] gaborgsomogyi commented on a change in pull request #26416: [SPARK-29779][CORE] Compact old event log files and cleanup
Date Thu, 14 Nov 2019 17:25:05 GMT
gaborgsomogyi 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_r346438644
 
 

 ##########
 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:
   Nit: `events.foreach(event => writer.writeEvent(convertEvent(event), flushLogger = true))`

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message