Github user redsanket commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17658#discussion_r114921697
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
    @@ -283,10 +283,15 @@ private[spark] object EventLoggingListener extends 
Logging {
        *
        * @param logStream Raw output stream to the event log file.
        */
    -  def initEventLog(logStream: OutputStream): Unit = {
    +  def initEventLog(logStream: OutputStream, testing: Boolean,
    +                   loggedEvents: ArrayBuffer[JValue]): Unit = {
         val metadata = SparkListenerLogStart(SPARK_VERSION)
    -    val metadataJson = compact(JsonProtocol.logStartToJson(metadata)) + 
"\n"
    +    val eventJson = JsonProtocol.logStartToJson(metadata)
    +    val metadataJson = compact(eventJson) + "\n"
         logStream.write(metadataJson.getBytes(StandardCharsets.UTF_8))
    +    if (testing && loggedEvents != null) {
    +      loggedEvents += eventJson
    --- End diff --
    
    I thought the loggedEvents only takes json value. Also the loggedEvents are 
generated here as a part of spark context and probably through other sources. 
The ReplayListenerSuite however tests the original events with the replay 
events (here the replay events are written to the event log but however the 
loggerEvents will not have the SparkListenerLogStart event as this is not a 
part of SparkContext if I understand it correctly).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to