File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
core/src/main/scala/org/apache/spark/status Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -171,9 +171,7 @@ private[spark] class AppStatusStore(
171171 // If there are no missing quantiles, return the data. Otherwise, just compute everything
172172 // to make the code simpler.
173173 if (cachedQuantiles.size == quantiles.size) {
174- def toValues (fn : CachedQuantile => Double ): IndexedSeq [Double ] = {
175- cachedQuantiles.map(fn).toIndexedSeq
176- }
174+ def toValues (fn : CachedQuantile => Double ): IndexedSeq [Double ] = cachedQuantiles.map(fn)
177175
178176 val distributions = new v1.TaskMetricDistributions (
179177 quantiles = quantiles,
@@ -342,7 +340,7 @@ private[spark] class AppStatusStore(
342340 */
343341 private def shouldCacheQuantile (q : Double ): Boolean = ((q * 100 ).toInt % 5 ) == 0
344342
345- private def quantileToString (q : Double ): String = (q * 100 ).toInt .toString
343+ private def quantileToString (q : Double ): String = math.round (q * 100 ).toString
346344
347345 def taskList (stageId : Int , stageAttemptId : Int , maxTasks : Int ): Seq [v1.TaskData ] = {
348346 val stageKey = Array (stageId, stageAttemptId)
You can’t perform that action at this time.
0 commit comments