Skip to content

Commit af7244e

Browse files
committed
minor update
1 parent f52eed8 commit af7244e

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

core/src/main/scala/org/apache/spark/status/LiveEntity.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,8 +731,8 @@ private object LiveEntityHelpers {
731731
def makeNegative(m: v1.TaskMetrics): v1.TaskMetrics = {
732732
// To handle 0 metric value, add 1 and make the metric negative.
733733
// To recover actual value do `math.abs(metric + 1)`
734-
// Eg: if the metric values are (5, 3, 0, 1) => Updated metrics value will be (-6, -4, -1, -2)
735-
// To get actual metric value math.abs(metric +1) => (5, 3, 0, 1)
734+
// Eg: if the metric values are (5, 3, 0, 1) => Updated metric values will be (-6, -4, -1, -2)
735+
// To get actual metric value, do math.abs(metric + 1) => (5, 3, 0, 1)
736736
def updateMetricValue(metric: Long): Long = {
737737
metric * -1L - 1L
738738
}

core/src/main/scala/org/apache/spark/status/storeTypes.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ private[spark] object TaskIndexNames {
137137
final val SHUFFLE_WRITE_RECORDS = "swr"
138138
final val SHUFFLE_WRITE_SIZE = "sws"
139139
final val SHUFFLE_WRITE_TIME = "swt"
140-
final val SHUFFLE_LOCAL_READ = "slr"
141140
final val STAGE = "stage"
142141
final val STATUS = "sta"
143142
final val TASK_INDEX = "idx"

core/src/test/scala/org/apache/spark/status/AppStatusStoreSuite.scala

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,16 @@ class AppStatusStoreSuite extends SparkFunSuite {
131131
}
132132
}
133133

134+
135+
test("SPARK-26260: task summary size for default metrics should be zero") {
136+
val store = new InMemoryStore()
137+
store.write(newTaskData(-1, status = "RUNNING"))
138+
Seq(new AppStatusStore(store), createLiveStore(store)).foreach { appStore =>
139+
val summary = appStore.taskSummary(stageId, attemptId, uiQuantiles)
140+
assert(summary.size === 0)
141+
}
142+
}
143+
134144
test("SPARK-26260: summary should contain successful tasks only when with LevelDB store") {
135145
val testDir = Utils.createTempDir()
136146
val diskStore = KVUtils.open(testDir, getClass().getName())
@@ -157,15 +167,6 @@ class AppStatusStoreSuite extends SparkFunSuite {
157167
Utils.deleteRecursively(testDir)
158168
}
159169

160-
test("SPARK-26260: task summary size for default metrics should be zero") {
161-
val store = new InMemoryStore()
162-
store.write(newTaskData(-1, status = "RUNNING"))
163-
Seq(new AppStatusStore(store), createLiveStore(store)).foreach { appStore =>
164-
val summary = appStore.taskSummary(stageId, attemptId, uiQuantiles)
165-
assert(summary.size === 0)
166-
}
167-
}
168-
169170
private def compareQuantiles(count: Int, quantiles: Array[Double]): Unit = {
170171
val store = new InMemoryStore()
171172
val values = (0 until count).map { i =>

0 commit comments

Comments
 (0)