public class JsonProtocol
extends Object
JsonProtocolSuite contains backwards-compatibility tests which check that the current version of JsonProtocol is able to read output written by earlier versions. We do not currently have tests for reading newer JSON output with older Spark versions.
To ensure that we provide these guarantees, follow these rules when modifying these methods:
- Never delete any JSON fields.
- Any new JSON fields should be optional; use Utils.jsonOption
when reading these fields
in *FromJson
methods.
Constructor and Description |
---|
JsonProtocol() |
Modifier and Type | Method and Description |
---|---|
static AccumulableInfo |
accumulableInfoFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
accumulableInfoToJson(AccumulableInfo accumulableInfo) |
static SparkListenerApplicationEnd |
applicationEndFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
applicationEndToJson(SparkListenerApplicationEnd applicationEnd) |
static SparkListenerApplicationStart |
applicationStartFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
applicationStartToJson(SparkListenerApplicationStart applicationStart) |
static SparkListenerBlockManagerAdded |
blockManagerAddedFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
blockManagerAddedToJson(SparkListenerBlockManagerAdded blockManagerAdded) |
static BlockManagerId |
blockManagerIdFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
blockManagerIdToJson(BlockManagerId blockManagerId) |
static SparkListenerBlockManagerRemoved |
blockManagerRemovedFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
blockManagerRemovedToJson(SparkListenerBlockManagerRemoved blockManagerRemoved) |
static BlockStatus |
blockStatusFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
blockStatusToJson(BlockStatus blockStatus) |
static SparkListenerEnvironmentUpdate |
environmentUpdateFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
environmentUpdateToJson(SparkListenerEnvironmentUpdate environmentUpdate) |
static Exception |
exceptionFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
exceptionToJson(Exception exception) |
static org.apache.spark.executor.InputMetrics |
inputMetricsFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
inputMetricsToJson(org.apache.spark.executor.InputMetrics inputMetrics) |
static SparkListenerJobEnd |
jobEndFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
jobEndToJson(SparkListenerJobEnd jobEnd) |
static JobResult |
jobResultFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
jobResultToJson(JobResult jobResult) |
static SparkListenerJobStart |
jobStartFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
jobStartToJson(SparkListenerJobStart jobStart) |
static scala.collection.Map<String,String> |
mapFromJson(org.json4s.JsonAST.JValue json)
-------------------------------- *
Util JSON deserialization methods |
---------------------------------
|
static org.json4s.JsonAST.JValue |
mapToJson(scala.collection.Map<String,String> m)
------------------------------ *
Util JSON serialization methods |
-------------------------------
|
static org.apache.spark.executor.OutputMetrics |
outputMetricsFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
outputMetricsToJson(org.apache.spark.executor.OutputMetrics outputMetrics) |
static java.util.Properties |
propertiesFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
propertiesToJson(java.util.Properties properties) |
static RDDInfo |
rddInfoFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
rddInfoToJson(RDDInfo rddInfo) |
static org.apache.spark.executor.ShuffleReadMetrics |
shuffleReadMetricsFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
shuffleReadMetricsToJson(org.apache.spark.executor.ShuffleReadMetrics shuffleReadMetrics) |
static org.apache.spark.executor.ShuffleWriteMetrics |
shuffleWriteMetricsFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
shuffleWriteMetricsToJson(org.apache.spark.executor.ShuffleWriteMetrics shuffleWriteMetrics) |
static SparkListenerEvent |
sparkEventFromJson(org.json4s.JsonAST.JValue json)
--------------------------------------------------- *
JSON deserialization methods for SparkListenerEvents |
----------------------------------------------------
|
static org.json4s.JsonAST.JValue |
sparkEventToJson(SparkListenerEvent event)
------------------------------------------------- *
JSON serialization methods for SparkListenerEvents |
--------------------------------------------------
|
static StackTraceElement[] |
stackTraceFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
stackTraceToJson(StackTraceElement[] stackTrace) |
static SparkListenerStageCompleted |
stageCompletedFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
stageCompletedToJson(SparkListenerStageCompleted stageCompleted) |
static StageInfo |
stageInfoFromJson(org.json4s.JsonAST.JValue json)
--------------------------------------------------------------------- *
JSON deserialization methods for classes SparkListenerEvents depend on |
----------------------------------------------------------------------
|
static org.json4s.JsonAST.JValue |
stageInfoToJson(StageInfo stageInfo)
------------------------------------------------------------------- *
JSON serialization methods for classes SparkListenerEvents depend on |
--------------------------------------------------------------------
|
static SparkListenerStageSubmitted |
stageSubmittedFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
stageSubmittedToJson(SparkListenerStageSubmitted stageSubmitted) |
static StorageLevel |
storageLevelFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
storageLevelToJson(StorageLevel storageLevel) |
static SparkListenerTaskEnd |
taskEndFromJson(org.json4s.JsonAST.JValue json) |
static TaskEndReason |
taskEndReasonFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
taskEndReasonToJson(TaskEndReason taskEndReason) |
static org.json4s.JsonAST.JValue |
taskEndToJson(SparkListenerTaskEnd taskEnd) |
static SparkListenerTaskGettingResult |
taskGettingResultFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
taskGettingResultToJson(SparkListenerTaskGettingResult taskGettingResult) |
static TaskInfo |
taskInfoFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
taskInfoToJson(TaskInfo taskInfo) |
static org.apache.spark.executor.TaskMetrics |
taskMetricsFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
taskMetricsToJson(org.apache.spark.executor.TaskMetrics taskMetrics) |
static SparkListenerTaskStart |
taskStartFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
taskStartToJson(SparkListenerTaskStart taskStart) |
static SparkListenerUnpersistRDD |
unpersistRDDFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
unpersistRDDToJson(SparkListenerUnpersistRDD unpersistRDD) |
static java.util.UUID |
UUIDFromJson(org.json4s.JsonAST.JValue json) |
static org.json4s.JsonAST.JValue |
UUIDToJson(java.util.UUID id) |
public static org.json4s.JsonAST.JValue sparkEventToJson(SparkListenerEvent event)
public static org.json4s.JsonAST.JValue stageSubmittedToJson(SparkListenerStageSubmitted stageSubmitted)
public static org.json4s.JsonAST.JValue stageCompletedToJson(SparkListenerStageCompleted stageCompleted)
public static org.json4s.JsonAST.JValue taskStartToJson(SparkListenerTaskStart taskStart)
public static org.json4s.JsonAST.JValue taskGettingResultToJson(SparkListenerTaskGettingResult taskGettingResult)
public static org.json4s.JsonAST.JValue taskEndToJson(SparkListenerTaskEnd taskEnd)
public static org.json4s.JsonAST.JValue jobStartToJson(SparkListenerJobStart jobStart)
public static org.json4s.JsonAST.JValue jobEndToJson(SparkListenerJobEnd jobEnd)
public static org.json4s.JsonAST.JValue environmentUpdateToJson(SparkListenerEnvironmentUpdate environmentUpdate)
public static org.json4s.JsonAST.JValue blockManagerAddedToJson(SparkListenerBlockManagerAdded blockManagerAdded)
public static org.json4s.JsonAST.JValue blockManagerRemovedToJson(SparkListenerBlockManagerRemoved blockManagerRemoved)
public static org.json4s.JsonAST.JValue unpersistRDDToJson(SparkListenerUnpersistRDD unpersistRDD)
public static org.json4s.JsonAST.JValue applicationStartToJson(SparkListenerApplicationStart applicationStart)
public static org.json4s.JsonAST.JValue applicationEndToJson(SparkListenerApplicationEnd applicationEnd)
public static org.json4s.JsonAST.JValue stageInfoToJson(StageInfo stageInfo)
public static org.json4s.JsonAST.JValue taskInfoToJson(TaskInfo taskInfo)
public static org.json4s.JsonAST.JValue accumulableInfoToJson(AccumulableInfo accumulableInfo)
public static org.json4s.JsonAST.JValue taskMetricsToJson(org.apache.spark.executor.TaskMetrics taskMetrics)
public static org.json4s.JsonAST.JValue shuffleReadMetricsToJson(org.apache.spark.executor.ShuffleReadMetrics shuffleReadMetrics)
public static org.json4s.JsonAST.JValue shuffleWriteMetricsToJson(org.apache.spark.executor.ShuffleWriteMetrics shuffleWriteMetrics)
public static org.json4s.JsonAST.JValue inputMetricsToJson(org.apache.spark.executor.InputMetrics inputMetrics)
public static org.json4s.JsonAST.JValue outputMetricsToJson(org.apache.spark.executor.OutputMetrics outputMetrics)
public static org.json4s.JsonAST.JValue taskEndReasonToJson(TaskEndReason taskEndReason)
public static org.json4s.JsonAST.JValue blockManagerIdToJson(BlockManagerId blockManagerId)
public static org.json4s.JsonAST.JValue jobResultToJson(JobResult jobResult)
public static org.json4s.JsonAST.JValue rddInfoToJson(RDDInfo rddInfo)
public static org.json4s.JsonAST.JValue storageLevelToJson(StorageLevel storageLevel)
public static org.json4s.JsonAST.JValue blockStatusToJson(BlockStatus blockStatus)
public static org.json4s.JsonAST.JValue mapToJson(scala.collection.Map<String,String> m)
public static org.json4s.JsonAST.JValue propertiesToJson(java.util.Properties properties)
public static org.json4s.JsonAST.JValue UUIDToJson(java.util.UUID id)
public static org.json4s.JsonAST.JValue stackTraceToJson(StackTraceElement[] stackTrace)
public static org.json4s.JsonAST.JValue exceptionToJson(Exception exception)
public static SparkListenerEvent sparkEventFromJson(org.json4s.JsonAST.JValue json)
public static SparkListenerStageSubmitted stageSubmittedFromJson(org.json4s.JsonAST.JValue json)
public static SparkListenerStageCompleted stageCompletedFromJson(org.json4s.JsonAST.JValue json)
public static SparkListenerTaskStart taskStartFromJson(org.json4s.JsonAST.JValue json)
public static SparkListenerTaskGettingResult taskGettingResultFromJson(org.json4s.JsonAST.JValue json)
public static SparkListenerTaskEnd taskEndFromJson(org.json4s.JsonAST.JValue json)
public static SparkListenerJobStart jobStartFromJson(org.json4s.JsonAST.JValue json)
public static SparkListenerJobEnd jobEndFromJson(org.json4s.JsonAST.JValue json)
public static SparkListenerEnvironmentUpdate environmentUpdateFromJson(org.json4s.JsonAST.JValue json)
public static SparkListenerBlockManagerAdded blockManagerAddedFromJson(org.json4s.JsonAST.JValue json)
public static SparkListenerBlockManagerRemoved blockManagerRemovedFromJson(org.json4s.JsonAST.JValue json)
public static SparkListenerUnpersistRDD unpersistRDDFromJson(org.json4s.JsonAST.JValue json)
public static SparkListenerApplicationStart applicationStartFromJson(org.json4s.JsonAST.JValue json)
public static SparkListenerApplicationEnd applicationEndFromJson(org.json4s.JsonAST.JValue json)
public static StageInfo stageInfoFromJson(org.json4s.JsonAST.JValue json)
public static TaskInfo taskInfoFromJson(org.json4s.JsonAST.JValue json)
public static AccumulableInfo accumulableInfoFromJson(org.json4s.JsonAST.JValue json)
public static org.apache.spark.executor.TaskMetrics taskMetricsFromJson(org.json4s.JsonAST.JValue json)
public static org.apache.spark.executor.ShuffleReadMetrics shuffleReadMetricsFromJson(org.json4s.JsonAST.JValue json)
public static org.apache.spark.executor.ShuffleWriteMetrics shuffleWriteMetricsFromJson(org.json4s.JsonAST.JValue json)
public static org.apache.spark.executor.InputMetrics inputMetricsFromJson(org.json4s.JsonAST.JValue json)
public static org.apache.spark.executor.OutputMetrics outputMetricsFromJson(org.json4s.JsonAST.JValue json)
public static TaskEndReason taskEndReasonFromJson(org.json4s.JsonAST.JValue json)
public static BlockManagerId blockManagerIdFromJson(org.json4s.JsonAST.JValue json)
public static JobResult jobResultFromJson(org.json4s.JsonAST.JValue json)
public static RDDInfo rddInfoFromJson(org.json4s.JsonAST.JValue json)
public static StorageLevel storageLevelFromJson(org.json4s.JsonAST.JValue json)
public static BlockStatus blockStatusFromJson(org.json4s.JsonAST.JValue json)
public static scala.collection.Map<String,String> mapFromJson(org.json4s.JsonAST.JValue json)
public static java.util.Properties propertiesFromJson(org.json4s.JsonAST.JValue json)
public static java.util.UUID UUIDFromJson(org.json4s.JsonAST.JValue json)
public static StackTraceElement[] stackTraceFromJson(org.json4s.JsonAST.JValue json)
public static Exception exceptionFromJson(org.json4s.JsonAST.JValue json)