Skip to content

Commit 484141a

Browse files
author
Eric Vandenberg
committed
Simplify syntax for EOFException case.
1 parent caeac28 commit 484141a

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

core/src/main/scala/org/apache/spark/scheduler/ReplayListenerBus.scala

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,7 @@ private[spark] class ReplayListenerBus extends SparkListenerBus with Logging {
107107
}
108108
}
109109
} catch {
110-
case eofe: EOFException =>
111-
// If the history event file is compressed and inprogress, the compressor will throw an
112-
// EOFException if there is not enough to decompress a proper frame. This indicates
113-
// we're at the end of the file so we treat similarly to the JsonParseException case above.
114-
if (!maybeTruncated) {
115-
throw eofe
116-
} else {
117-
logWarning(s"Got EOFException from log file $sourceName" +
118-
s" at line $lineNumber, the file might not have finished writing cleanly.")
119-
}
110+
case _: EOFException if maybeTruncated =>
120111
case ioe: IOException =>
121112
throw ioe
122113
case e: Exception =>

0 commit comments

Comments
 (0)