comphead commented on code in PR #6401:
URL: https://github.com/apache/datafusion-comet/pull/6401#discussion_r4146375490


##########
spark/src/main/scala/org/apache/comet/CometExecIterator.scala:
##########
@@ -527,6 +551,55 @@ object CometExecIterator extends Logging {
     }
   }
 
+  /**
+   * Sends a memory usage sample to the driver, which posts it to the listener 
bus for the event
+   * log to record, and returns whether it did. It does when the application 
writes an event log,
+   * which `spark.eventLog.enabled` shows on the executor as well as on the 
driver, and the
+   * executor runs the Comet plugin, whose channel to the driver carries the 
sample. Both are
+   * checked for every sample rather than once, because in local mode each 
SparkContext starts its
+   * own executor plugin. A failure to send is not retried: those that surface 
here, such as a
+   * driver endpoint that could not be found, persist, so the log falls back 
to the executor's log
+   * for good.
+   */
+  private[apache] def sendToEventLog(usage: Array[Long], jvmArrow: 
JvmArrowMemory): Boolean =
+    (Option(SparkEnv.get), CometExecutorPlugin.pluginContext) match {
+      case (Some(env), Some(pluginContext))
+          if !eventLogSendFailed && env.conf.getBoolean(EVENT_LOG_ENABLED, 
false) =>

Review Comment:
   Updated the description.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to