@@ -92,12 +92,12 @@ class AppStatusStoreSuite extends SparkFunSuite {
92
92
}
93
93
}
94
94
95
- test(" SPARK-28638 : only successful tasks have taskSummary when with disk kvstore (LevelDB)" ) {
95
+ test(" SPARK-26260 : only successful tasks have taskSummary when with disk kvstore (LevelDB)" ) {
96
96
val testDir = Utils .createTempDir()
97
- val store = KVUtils .open(testDir, getClass().getName())
97
+ val diskStore = KVUtils .open(testDir, getClass().getName())
98
98
99
- (0 until 5 ).foreach { i => store .write(newTaskData(i, status = " FAILED" )) }
100
- Seq (new AppStatusStore (store )).foreach { appStore =>
99
+ (0 until 5 ).foreach { i => diskStore .write(newTaskData(i, status = " FAILED" )) }
100
+ Seq (new AppStatusStore (diskStore )).foreach { appStore =>
101
101
val summary = appStore.taskSummary(stageId, attemptId, uiQuantiles)
102
102
assert(summary.size === 0 )
103
103
}
@@ -126,21 +126,19 @@ class AppStatusStoreSuite extends SparkFunSuite {
126
126
}
127
127
}
128
128
129
- test(" summary should contain successful tasks only when with disk kvstore (LevelDB)" ) {
130
-
129
+ test(" SPARK-26260: summary should contain successful tasks only when with LevelDB store" ) {
131
130
val testDir = Utils .createTempDir()
132
-
133
- val store = KVUtils .open(testDir, getClass().getName())
131
+ val diskStore = KVUtils .open(testDir, getClass().getName())
134
132
135
133
for (i <- 0 to 5 ) {
136
134
if (i % 2 == 1 ) {
137
- store .write(newTaskData(i, status = " FAILED" ))
135
+ diskStore .write(newTaskData(i, status = " FAILED" ))
138
136
} else {
139
- store .write(newTaskData(i))
137
+ diskStore .write(newTaskData(i))
140
138
}
141
139
}
142
140
143
- Seq (new AppStatusStore (store )).foreach { appStore =>
141
+ Seq (new AppStatusStore (diskStore )).foreach { appStore =>
144
142
val summary = appStore.taskSummary(stageId, attemptId, uiQuantiles).get
145
143
146
144
val values = Array (0.0 , 2.0 , 4.0 )
@@ -150,7 +148,7 @@ class AppStatusStoreSuite extends SparkFunSuite {
150
148
assert(expected === actual)
151
149
}
152
150
}
153
- store .close()
151
+ diskStore .close()
154
152
Utils .deleteRecursively(testDir)
155
153
}
156
154
0 commit comments