Skip to content
Snippets Groups Projects
Commit 9e7725c8 authored by GuoQiang Li's avatar GuoQiang Li Committed by Matei Zaharia
Browse files

SPARK-2662: Fix NPE for JsonProtocol

Author: GuoQiang Li <witgo@qq.com>

Closes #1511 from witgo/JsonProtocol and squashes the following commits:

2b6227f [GuoQiang Li] Fix NPE for JsonProtocol
parent 2d25e348
No related branches found
No related tags found
No related merge requests found
......@@ -257,7 +257,8 @@ private[spark] object JsonProtocol {
val reason = Utils.getFormattedClassName(taskEndReason)
val json = taskEndReason match {
case fetchFailed: FetchFailed =>
val blockManagerAddress = blockManagerIdToJson(fetchFailed.bmAddress)
val blockManagerAddress = Option(fetchFailed.bmAddress).
map(blockManagerIdToJson).getOrElse(JNothing)
("Block Manager Address" -> blockManagerAddress) ~
("Shuffle ID" -> fetchFailed.shuffleId) ~
("Map ID" -> fetchFailed.mapId) ~
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment