You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by pw...@apache.org on 2013/12/30 16:44:41 UTC
[2/3] git commit: Updated code style according to Patrick's comments
Updated code style according to Patrick's comments
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/c2c1af39
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/c2c1af39
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/c2c1af39
Branch: refs/heads/master
Commit: c2c1af39f593cd00d29368efe2dbb8c0444f624d
Parents: b4619e5
Author: Kay Ousterhout <ka...@gmail.com>
Authored: Sun Dec 29 21:10:08 2013 -0800
Committer: Kay Ousterhout <ka...@gmail.com>
Committed: Sun Dec 29 21:10:08 2013 -0800
----------------------------------------------------------------------
.../main/scala/org/apache/spark/scheduler/SparkListener.scala | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/c2c1af39/core/src/main/scala/org/apache/spark/scheduler/SparkListener.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/scheduler/SparkListener.scala b/core/src/main/scala/org/apache/spark/scheduler/SparkListener.scala
index 3becb4f..627995c 100644
--- a/core/src/main/scala/org/apache/spark/scheduler/SparkListener.scala
+++ b/core/src/main/scala/org/apache/spark/scheduler/SparkListener.scala
@@ -119,8 +119,7 @@ object StatsReportListener extends Logging {
val probabilities = percentiles.map{_ / 100.0}
val percentilesHeader = "\t" + percentiles.mkString("%\t") + "%"
- def extractDoubleDistribution(
- stage:SparkListenerStageCompleted,
+ def extractDoubleDistribution(stage: SparkListenerStageCompleted,
getMetric: (TaskInfo,TaskMetrics) => Option[Double])
: Option[Distribution] = {
Distribution(stage.stage.taskInfos.flatMap {
@@ -128,8 +127,7 @@ object StatsReportListener extends Logging {
}
//is there some way to setup the types that I can get rid of this completely?
- def extractLongDistribution(
- stage:SparkListenerStageCompleted,
+ def extractLongDistribution(stage: SparkListenerStageCompleted,
getMetric: (TaskInfo,TaskMetrics) => Option[Long])
: Option[Distribution] = {
extractDoubleDistribution(stage, (info, metric) => getMetric(info,metric).map{_.toDouble})