[
https://issues.apache.org/jira/browse/SPARK-25645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16639079#comment-16639079
]
Devaraj K commented on SPARK-25645:
-----------------------------------
{code:java|title=with hflush(no hsync)|borderStyle=solid}
18/10/04 17:01:12 WARN NativeCodeLoader: Unable to load native-hadoop library
for your platform... using builtin-java classes where applicable
18/10/04 17:01:13 WARN Client: Neither spark.yarn.jars nor spark.yarn.archive
is set, falling back to uploading libraries under SPARK_HOME.
18/10/04 17:03:35 WARN AsyncEventQueue: [ADDED-LOG-BEFORE-DISPATCH-THREAD-JOIN]
Thread.currentThread():main, dispatchThread:spark-listener-group-appStatus,
eventQueue.size(): 1
18/10/04 17:03:35 WARN AsyncEventQueue: [ADDED-LOG-AFTER-DISPATCH-THREAD-JOIN]
Thread.currentThread():main, dispatchThread:spark-listener-group-appStatus,
eventQueue.size(): 0
18/10/04 17:03:35 WARN AsyncEventQueue: [ADDED-LOG-BEFORE-DISPATCH-THREAD-JOIN]
Thread.currentThread():main,
dispatchThread:spark-listener-group-executorManagement, eventQueue.size(): 1
18/10/04 17:03:35 WARN AsyncEventQueue: [ADDED-LOG-AFTER-DISPATCH-THREAD-JOIN]
Thread.currentThread():main,
dispatchThread:spark-listener-group-executorManagement, eventQueue.size(): 0
18/10/04 17:03:35 WARN AsyncEventQueue: [ADDED-LOG-BEFORE-DISPATCH-THREAD-JOIN]
Thread.currentThread():main, dispatchThread:spark-listener-group-eventLog,
eventQueue.size(): 1
18/10/04 17:03:35 WARN AsyncEventQueue: [ADDED-LOG-AFTER-DISPATCH-THREAD-JOIN]
Thread.currentThread():main, dispatchThread:spark-listener-group-eventLog,
eventQueue.size(): 0
{code}
with hflush(no hsync), it is slightly(2 sec) taking more than the no-hflush for
all events, and don't see any dropped events here as well.
> Add provision to disable EventLoggingListener default flush/hsync/hflush for
> all events
> ---------------------------------------------------------------------------------------
>
> Key: SPARK-25645
> URL: https://issues.apache.org/jira/browse/SPARK-25645
> Project: Spark
> Issue Type: Improvement
> Components: Spark Core
> Affects Versions: 2.3.2
> Reporter: Devaraj K
> Priority: Major
>
> {code:java|title=EventLoggingListener.scala|borderStyle=solid}
> private def logEvent(event: SparkListenerEvent, flushLogger: Boolean = false)
> {
> val eventJson = JsonProtocol.sparkEventToJson(event)
> // scalastyle:off println
> writer.foreach(_.println(compact(render(eventJson))))
> // scalastyle:on println
> if (flushLogger) {
> writer.foreach(_.flush())
> hadoopDataStream.foreach(ds => ds.getWrappedStream match {
> case wrapped: DFSOutputStream =>
> wrapped.hsync(EnumSet.of(SyncFlag.UPDATE_LENGTH))
> case _ => ds.hflush()
> })
> }
> {code}
> There are events which come with flushLogger=true and go through the
> underlying stream flush, Here I tried running apps with disabling the
> flush/hsync/hflush for all events and see that there is significant
> improvement in the app completion time and also there are no event drops,
> posting more details in the comments section.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]