Skip to content

Commit 8a1464e

Browse files
committed
Replaced a variable with simple field reference
1 parent c660fbc commit 8a1464e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

core/src/main/scala/org/apache/spark/util/JsonProtocol.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ import scala.collection.Map
2525
import org.json4s.DefaultFormats
2626
import org.json4s.JsonDSL._
2727
import org.json4s.JsonAST._
28-
29-
// Don't remove. It may seem this statement is useless but this is need to parse with Jackson
3028
import org.json4s.jackson.JsonMethods._
3129

3230

@@ -207,7 +205,6 @@ private[spark] object JsonProtocol {
207205
}
208206

209207
def taskInfoToJson(taskInfo: TaskInfo): JValue = {
210-
val accumUpdateMap = taskInfo.accumulables
211208
("Task ID" -> taskInfo.taskId) ~
212209
("Index" -> taskInfo.index) ~
213210
("Attempt" -> taskInfo.attempt) ~
@@ -219,7 +216,7 @@ private[spark] object JsonProtocol {
219216
("Getting Result Time" -> taskInfo.gettingResultTime) ~
220217
("Finish Time" -> taskInfo.finishTime) ~
221218
("Failed" -> taskInfo.failed) ~
222-
("Accumulables" -> JArray(accumUpdateMap.map(accumulableInfoToJson).toList))
219+
("Accumulables" -> JArray(taskInfo.accumulables.map(accumulableInfoToJson).toList))
223220
}
224221

225222
def accumulableInfoToJson(accumulableInfo: AccumulableInfo): JValue = {

0 commit comments

Comments
 (0)