Skip to content

Commit

Permalink
Fixed SparkParallelTracker to work with Spark2.3 (dmlc#3062)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasatdatabricks authored and superbobry committed Jan 25, 2018
1 parent f87802f commit 5ef6846
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@ class SparkParallelismTracker(
}

private[this] def safeExecute[T](body: => T): T = {
sc.listenerBus.listeners.add(0, new TaskFailedListener)
val listener = new TaskFailedListener;
sc.addSparkListener(listener)
try {
body
} finally {
sc.listenerBus.listeners.remove(0)
sc.listenerBus.removeListener(listener)
}
}

Expand Down

0 comments on commit 5ef6846

Please sign in to comment.