spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pwend...@apache.org
Subject [4/5] git commit: Minor clean-up in review
Date Tue, 22 Oct 2013 18:31:29 GMT
Minor clean-up in review


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

Branch: refs/heads/master
Commit: c22046b3cc740733b86ddf6daa638de447c32c73
Parents: 7de0ea4
Author: Patrick Wendell <pwendell@gmail.com>
Authored: Tue Oct 22 10:37:09 2013 -0700
Committer: Patrick Wendell <pwendell@gmail.com>
Committed: Tue Oct 22 11:00:50 2013 -0700

----------------------------------------------------------------------
 .../main/scala/org/apache/spark/scheduler/DAGScheduler.scala    | 5 ++---
 core/src/main/scala/org/apache/spark/scheduler/Stage.scala      | 4 ----
 .../scala/org/apache/spark/scheduler/SparkListenerSuite.scala   | 2 +-
 3 files changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/c22046b3/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 ff68255..dda194d 100644
--- a/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
+++ b/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
@@ -608,7 +608,6 @@ class DAGScheduler(
       logDebug("New pending tasks: " + myPending)
       taskSched.submitTasks(
         new TaskSet(tasks.toArray, stage.id, stage.newAttemptId(), stage.jobId, properties))
-      stage.submissionTime = Some(System.currentTimeMillis())
       stageToInfos(stage).submissionTime = Some(System.currentTimeMillis())
     } else {
       logDebug("Stage " + stage + " is actually done; %b %d %d".format(
@@ -631,9 +630,9 @@ class DAGScheduler(
     val stage = stageIdToStage(task.stageId)
 
     def markStageAsFinished(stage: Stage) = {
-      val serviceTime = stage.submissionTime match {
+      val serviceTime = stageToInfos(stage).submissionTime match {
         case Some(t) => "%.03f".format((System.currentTimeMillis() - t) / 1000.0)
-        case _ => "Unkown"
+        case _ => "Unknown"
       }
       logInfo("%s (%s) finished in %s s".format(stage, stage.name, serviceTime))
       stageToInfos(stage).completionTime = Some(System.currentTimeMillis())

http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/c22046b3/core/src/main/scala/org/apache/spark/scheduler/Stage.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/scheduler/Stage.scala b/core/src/main/scala/org/apache/spark/scheduler/Stage.scala
index d06633d..7cb3fe4 100644
--- a/core/src/main/scala/org/apache/spark/scheduler/Stage.scala
+++ b/core/src/main/scala/org/apache/spark/scheduler/Stage.scala
@@ -50,10 +50,6 @@ private[spark] class Stage(
   val numPartitions = rdd.partitions.size
   val outputLocs = Array.fill[List[MapStatus]](numPartitions)(Nil)
   var numAvailableOutputs = 0
-
-  /** When this stage was submitted from the DAGScheduler to a TaskScheduler. */
-  var submissionTime: Option[Long] = None
-
   private var nextAttemptId = 0
 
   def isAvailable: Boolean = {

http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/c22046b3/core/src/test/scala/org/apache/spark/scheduler/SparkListenerSuite.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/org/apache/spark/scheduler/SparkListenerSuite.scala b/core/src/test/scala/org/apache/spark/scheduler/SparkListenerSuite.scala
index 5ce92bc..42ca988 100644
--- a/core/src/test/scala/org/apache/spark/scheduler/SparkListenerSuite.scala
+++ b/core/src/test/scala/org/apache/spark/scheduler/SparkListenerSuite.scala
@@ -18,7 +18,7 @@
 package org.apache.spark.scheduler
 
 import org.scalatest.{BeforeAndAfter, FunSuite}
-import org.apache.spark.{TaskContext, SparkContext, LocalSparkContext}
+import org.apache.spark.{LocalSparkContext, SparkContext}
 import scala.collection.mutable
 import org.scalatest.matchers.ShouldMatchers
 import org.apache.spark.SparkContext._


Mime
View raw message