diff options
author | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-10-05 13:38:59 -0700 |
---|---|---|
committer | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-10-05 13:38:59 -0700 |
commit | 100222b048a4957eeb4642d0cd3c54b2b468b0b4 (patch) | |
tree | b5b9cd62a2c1c3690cd87dda366fc480ac0efb5e /core | |
parent | 08641932bd17910cb5a839cdc7daeebfe4ae7ada (diff) | |
parent | 1577b373a9403b0f1de2bb4b4cfcdbd13c09b5b0 (diff) | |
download | spark-100222b048a4957eeb4642d0cd3c54b2b468b0b4.tar.gz spark-100222b048a4957eeb4642d0cd3c54b2b468b0b4.tar.bz2 spark-100222b048a4957eeb4642d0cd3c54b2b468b0b4.zip |
Merge pull request #27 from davidmccauley/master
SPARK-920/921 - JSON endpoint updates
920 - Removal of duplicate scheme part of Spark URI, it was appearing as spark://spark//host:port in the JSON field.
JSON now delivered as:
url:spark://127.0.0.1:7077
921 - Adding the URL of the Main Application UI will allow custom interfaces (that use the JSON output) to redirect from the standalone UI.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/org/apache/spark/deploy/JsonProtocol.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/JsonProtocol.scala b/core/src/main/scala/org/apache/spark/deploy/JsonProtocol.scala index 87a703427c..04d01c169d 100644 --- a/core/src/main/scala/org/apache/spark/deploy/JsonProtocol.scala +++ b/core/src/main/scala/org/apache/spark/deploy/JsonProtocol.scala @@ -41,6 +41,7 @@ private[spark] object JsonProtocol { ("starttime" -> obj.startTime) ~ ("id" -> obj.id) ~ ("name" -> obj.desc.name) ~ + ("appuiurl" -> obj.appUiUrl) ~ ("cores" -> obj.desc.maxCores) ~ ("user" -> obj.desc.user) ~ ("memoryperslave" -> obj.desc.memoryPerSlave) ~ @@ -64,7 +65,7 @@ private[spark] object JsonProtocol { } def writeMasterState(obj: MasterStateResponse) = { - ("url" -> ("spark://" + obj.uri)) ~ + ("url" -> obj.uri) ~ ("workers" -> obj.workers.toList.map(writeWorkerInfo)) ~ ("cores" -> obj.workers.map(_.cores).sum) ~ ("coresused" -> obj.workers.map(_.coresUsed).sum) ~ |