Skip to content

Commit

Permalink
SPARK-1408 Modify Spark on Yarn to point to the history server when a…
Browse files Browse the repository at this point in the history
…pp finishes
  • Loading branch information
tgravescs committed Apr 9, 2014
1 parent 6dc5f58 commit f5d5373
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
7 changes: 7 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,13 @@ Apart from these, the following properties are also available, and may be useful
Number of cores to allocate for each task.
</td>
</tr>
<tr>
<td>spark.historyserver.address</td>
<td>localhost:18080</td>
<td>
The URL of the Spark history server. The history server is optional.
</td>
</tr>
</table>

## Viewing Spark Properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,7 @@ class ApplicationMaster(args: ApplicationMasterArguments, conf: Configuration,
finishReq.setAppAttemptId(appAttemptId)
finishReq.setFinishApplicationStatus(status)
finishReq.setDiagnostics(diagnostics)
// Set tracking url to empty since we don't have a history server.
finishReq.setTrackingUrl("")
finishReq.setTrackingUrl(sparkConf.get("spark.historyserver.address", ""))
resourceManager.finishApplicationMaster(finishReq)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ class ApplicationMaster(args: ApplicationMasterArguments, conf: Configuration,

logInfo("finishApplicationMaster with " + status)
if (registered) {
// Set tracking URL to empty since we don't have a history server.
amClient.unregisterApplicationMaster(status, "" /* appMessage */ , "" /* appTrackingUrl */)
val trackingUrl = sparkConf.get("spark.historyserver.address", "")
amClient.unregisterApplicationMaster(status, diagnostics, trackingUrl)
}
}
}
Expand Down

0 comments on commit f5d5373

Please sign in to comment.