aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorKay Ousterhout <kayousterhout@gmail.com>2013-12-29 21:10:08 -0800
committerKay Ousterhout <kayousterhout@gmail.com>2013-12-29 21:10:08 -0800
commitc2c1af39f593cd00d29368efe2dbb8c0444f624d (patch)
treeb910813dcc9c251796b2ec193cef8e687b80361b /core
parentb4619e509bc3e06baa3b031ef2c1981d3bf02cbd (diff)
downloadspark-c2c1af39f593cd00d29368efe2dbb8c0444f624d.tar.gz
spark-c2c1af39f593cd00d29368efe2dbb8c0444f624d.tar.bz2
spark-c2c1af39f593cd00d29368efe2dbb8c0444f624d.zip
Updated code style according to Patrick's comments
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/org/apache/spark/scheduler/SparkListener.scala6
1 files changed, 2 insertions, 4 deletions
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 3becb4f068..627995c826 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})