Repository: spark
Updated Branches:
  refs/heads/branch-2.4 3dba5d41f -> bb211cf27


[SPARK-25697][CORE] When zstd compression enabled, InProgress application is 
throwing Error in the history webui

## What changes were proposed in this pull request?
When we enable event log compression and compression codec as 'zstd', we are 
unable to open the webui of the running application from the history server 
page.
The reason is that, Replay listener was unable to read from the zstd compressed 
eventlog due to the zstd frame was not finished yet. This causes truncated 
error while reading the eventLog.

So, when we try to open the WebUI from the History server page, it throws 
"truncated error ", and we never able to open running application in the webui, 
when we enable zstd compression.

In this PR, when the IO excpetion happens, and if it is a running application, 
we  log the error,
"Failed to read Spark event log: evetLogDirAppName.inprogress", instead of 
throwing exception.

## How was this patch tested?
Test steps:
1)spark.eventLog.compress =  true
2)spark.io.compression.codec = zstd
3)restart history server
4) launch bin/spark-shell
5) run some queries
6) Open history server page
7) click on the application

**Before fix:**
![screenshot from 2018-10-10 
23-52-12](https://user-images.githubusercontent.com/23054875/46757387-9b4fa580-cce7-11e8-96ad-8938400483ed.png)

![screenshot from 2018-10-10 
23-52-28](https://user-images.githubusercontent.com/23054875/46757393-a0145980-cce7-11e8-8cb0-44b583dde648.png)

**After fix:**

![screenshot from 2018-10-10 
23-43-49](https://user-images.githubusercontent.com/23054875/46756971-6858e200-cce6-11e8-946c-0bffebb2cfba.png)

![screenshot from 2018-10-10 
23-44-05](https://user-images.githubusercontent.com/23054875/46756981-6d1d9600-cce6-11e8-95ea-ff8339a2fdfd.png)

(Please explain how this patch was tested. E.g. unit tests, integration tests, 
manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, 
remove this)

Please review http://spark.apache.org/contributing.html before opening a pull 
request.

Closes #22689 from shahidki31/SPARK-25697.

Authored-by: Shahid <shahidk...@gmail.com>
Signed-off-by: Sean Owen <sean.o...@databricks.com>
(cherry picked from commit 8e039a75548e91b0a8799d9d72c6797b066ddd62)
Signed-off-by: Sean Owen <sean.o...@databricks.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/bb211cf2
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/bb211cf2
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/bb211cf2

Branch: refs/heads/branch-2.4
Commit: bb211cf27bd1e106da430fff144a3a579cce026d
Parents: 3dba5d4
Author: Shahid <shahidk...@gmail.com>
Authored: Fri Oct 12 12:57:09 2018 -0500
Committer: Sean Owen <sean.o...@databricks.com>
Committed: Fri Oct 12 12:57:25 2018 -0500

----------------------------------------------------------------------
 .../main/scala/org/apache/spark/scheduler/ReplayListenerBus.scala  | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/bb211cf2/core/src/main/scala/org/apache/spark/scheduler/ReplayListenerBus.scala
----------------------------------------------------------------------
diff --git 
a/core/src/main/scala/org/apache/spark/scheduler/ReplayListenerBus.scala 
b/core/src/main/scala/org/apache/spark/scheduler/ReplayListenerBus.scala
index 226c237..4c6b0c1 100644
--- a/core/src/main/scala/org/apache/spark/scheduler/ReplayListenerBus.scala
+++ b/core/src/main/scala/org/apache/spark/scheduler/ReplayListenerBus.scala
@@ -118,6 +118,8 @@ private[spark] class ReplayListenerBus extends 
SparkListenerBus with Logging {
       case e: HaltReplayException =>
         // Just stop replay.
       case _: EOFException if maybeTruncated =>
+      case _: IOException if maybeTruncated =>
+        logWarning(s"Failed to read Spark event log: $sourceName")
       case ioe: IOException =>
         throw ioe
       case e: Exception =>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to