spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [1/2] git commit: Using compact case class pattern matching syntax to simplify code in DAGScheduler.processEvent
Date Tue, 05 Nov 2013 18:42:22 GMT
Updated Branches:
  refs/heads/master 81065321c -> 9f7b9bb1c


Using compact case class pattern matching syntax to simplify code in DAGScheduler.processEvent


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

Branch: refs/heads/master
Commit: 8b4c994e8ce29d6cecabb5cdfef66212cc79301d
Parents: 8106532
Author: Lian, Cheng <rhythm.mail@gmail.com>
Authored: Tue Nov 5 17:18:42 2013 +0800
Committer: Lian, Cheng <rhythm.mail@gmail.com>
Committed: Tue Nov 5 17:18:42 2013 +0800

----------------------------------------------------------------------
 .../org/apache/spark/scheduler/DAGScheduler.scala      | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/8b4c994e/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala b/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
index 4cef082..d0b21e8 100644
--- a/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
+++ b/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
@@ -417,15 +417,14 @@ class DAGScheduler(
       case ExecutorLost(execId) =>
         handleExecutorLost(execId)
 
-      case begin: BeginEvent =>
-        listenerBus.post(SparkListenerTaskStart(begin.task, begin.taskInfo))
+      case BeginEvent(task, taskInfo) =>
+        listenerBus.post(SparkListenerTaskStart(task, taskInfo))
 
-      case gettingResult: GettingResultEvent =>
-        listenerBus.post(SparkListenerTaskGettingResult(gettingResult.task, gettingResult.taskInfo))
+      case GettingResultEvent(task, taskInfo) =>
+        listenerBus.post(SparkListenerTaskGettingResult(task, taskInfo))
 
-      case completion: CompletionEvent =>
-        listenerBus.post(SparkListenerTaskEnd(
-          completion.task, completion.reason, completion.taskInfo, completion.taskMetrics))
+      case completion @ CompletionEvent(task, reason, _, _, taskInfo, taskMetrics) =>
+        listenerBus.post(SparkListenerTaskEnd(task, reason, taskInfo, taskMetrics))
         handleTaskCompletion(completion)
 
       case TaskSetFailed(taskSet, reason) =>


Mime
View raw message