Skip to content

Commit e937a0a

Browse files
committed
Address Prashant and Matei's comments
1 parent 1867867 commit e937a0a

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ private[spark] object PythonRDD {
281281
}
282282
} catch {
283283
case eof: EOFException => {}
284-
case e: Exception => throw e
285284
}
286285
JavaRDD.fromRDD(sc.sc.parallelize(objs, parallelism))
287286
}

core/src/main/scala/org/apache/spark/executor/Executor.scala

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -241,26 +241,21 @@ private[spark] class Executor(
241241
// Attempt to exit cleanly by informing the driver of our failure.
242242
// If anything goes wrong (or this was a fatal exception), we will delegate to
243243
// the default uncaught exception handler, which will terminate the Executor.
244-
try {
245-
logError("Exception in task ID " + taskId, t)
246-
247-
val serviceTime = System.currentTimeMillis() - taskStart
248-
val metrics = attemptedTask.flatMap(t => t.metrics)
249-
for (m <- metrics) {
250-
m.executorRunTime = serviceTime
251-
m.jvmGCTime = gcTime - startGCTime
252-
}
253-
val reason = ExceptionFailure(t.getClass.getName, t.toString, t.getStackTrace, metrics)
254-
execBackend.statusUpdate(taskId, TaskState.FAILED, ser.serialize(reason))
255-
256-
// Don't forcibly exit unless the exception was inherently fatal, to avoid
257-
// stopping other tasks unnecessarily.
258-
if (Utils.isFatalError(t)) {
259-
ExecutorUncaughtExceptionHandler.uncaughtException(t)
260-
}
261-
} catch {
262-
case t2: Throwable =>
263-
ExecutorUncaughtExceptionHandler.uncaughtException(t2)
244+
logError("Exception in task ID " + taskId, t)
245+
246+
val serviceTime = System.currentTimeMillis() - taskStart
247+
val metrics = attemptedTask.flatMap(t => t.metrics)
248+
for (m <- metrics) {
249+
m.executorRunTime = serviceTime
250+
m.jvmGCTime = gcTime - startGCTime
251+
}
252+
val reason = ExceptionFailure(t.getClass.getName, t.toString, t.getStackTrace, metrics)
253+
execBackend.statusUpdate(taskId, TaskState.FAILED, ser.serialize(reason))
254+
255+
// Don't forcibly exit unless the exception was inherently fatal, to avoid
256+
// stopping other tasks unnecessarily.
257+
if (Utils.isFatalError(t)) {
258+
ExecutorUncaughtExceptionHandler.uncaughtException(t)
264259
}
265260
}
266261
} finally {

0 commit comments

Comments
 (0)