Github user liyezhang556520 commented on a diff in the pull request:
https://github.com/apache/spark/pull/4891#discussion_r25864977
--- Diff:
core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala ---
@@ -202,13 +202,23 @@ private[spark] class EventLoggingListener(
}
}
fileSystem.rename(new Path(logPath + IN_PROGRESS), target)
+ writer = None
}
+ Runtime.getRuntime.addShutdownHook(new Thread("Renaming inprogress log
to logPath") {
+ override def run(): Unit = Utils.logUncaughtExceptions {
+ if (writer != None && fileSystem.exists(new Path(logPath +
IN_PROGRESS))) {
+ logDebug("Inprogressing event log exists. Application may be
terminated abnormally.")
+ fileSystem.rename(new Path(logPath + IN_PROGRESS), new
Path(logPath + ABNORMAL))
--- End diff --
@viirya , I encountered exception with this `rename` operation on, and no
exception without this line, did you meet this? I haven't figure out why.
```java.lang.IllegalArgumentException: Codec [abnormal] is not available.
Consider setting spark.io.compression.codec=lzf
at
org.apache.spark.io.CompressionCodec$$anonfun$createCodec$1.apply(CompressionCodec.scala:73)
at
org.apache.spark.io.CompressionCodec$$anonfun$createCodec$1.apply(CompressionCodec.scala:73)
at scala.Option.getOrElse(Option.scala:120)
at
org.apache.spark.io.CompressionCodec$.createCodec(CompressionCodec.scala:73)
at
org.apache.spark.scheduler.EventLoggingListener$$anonfun$8$$anonfun$apply$2.apply(EventLoggingListener.scala:287)
at
org.apache.spark.scheduler.EventLoggingListener$$anonfun$8$$anonfun$apply$2.apply(EventLoggingListener.scala:287)
at
scala.collection.mutable.MapLike$class.getOrElseUpdate(MapLike.scala:189)
at scala.collection.mutable.AbstractMap.getOrElseUpdate(Map.scala:91)
at
org.apache.spark.scheduler.EventLoggingListener$$anonfun$8.apply(EventLoggingListener.scala:287)
at
org.apache.spark.scheduler.EventLoggingListener$$anonfun$8.apply(EventLoggingListener.scala:286)
at scala.Option.map(Option.scala:145)
at
org.apache.spark.scheduler.EventLoggingListener$.openEventLog(EventLoggingListener.scala:286)
at
org.apache.spark.deploy.master.Master.rebuildSparkUI(Master.scala:773)
at
org.apache.spark.deploy.master.Master.removeApplication(Master.scala:710)
at
org.apache.spark.deploy.master.Master.finishApplication(Master.scala:688)```
---
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]