Skip to content

Commit

Permalink
Fixed the test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
sarutak committed Jan 14, 2015
1 parent 2d47bd3 commit 26b9b99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/scala/org/apache/spark/util/JsonProtocol.scala
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private[spark] object JsonProtocol {
val jobResult = jobResultToJson(jobEnd.jobResult)
("Event" -> Utils.getFormattedClassName(jobEnd)) ~
("Job ID" -> jobEnd.jobId) ~
("Completaion Time" -> jobEnd.time) ~
("Completion Time" -> jobEnd.time) ~
("Job Result" -> jobResult)
}

Expand Down Expand Up @@ -484,7 +484,7 @@ private[spark] object JsonProtocol {

def jobEndFromJson(json: JValue): SparkListenerJobEnd = {
val jobId = (json \ "Job ID").extract[Int]
val completionTime = (json \ "Completaion Time").extractOpt[Long]
val completionTime = (json \ "Completion Time").extractOpt[Long]
val jobResult = jobResultFromJson(json \ "Job Result")
SparkListenerJobEnd(jobId, completionTime, jobResult)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,7 @@ class JsonProtocolSuite extends FunSuite {
|{
| "Event": "SparkListenerJobStart",
| "Job ID": 10,
| "Submission Time": 1421191042750,
| "Stage Infos": [
| {
| "Stage ID": 1,
Expand Down Expand Up @@ -1331,6 +1332,7 @@ class JsonProtocolSuite extends FunSuite {
|{
| "Event": "SparkListenerJobEnd",
| "Job ID": 20,
| "Completion Time": 1421191296660,
| "Job Result": {
| "Result": "JobSucceeded"
| }
Expand Down

0 comments on commit 26b9b99

Please sign in to comment.