Repository: spark
Updated Branches:
  refs/heads/branch-2.3 4dc6719e9 -> aba52f449


[SPARK-24188][CORE] Restore "/version" API endpoint.

It was missing the jax-rs annotation.

Author: Marcelo Vanzin <[email protected]>

Closes #21245 from vanzin/SPARK-24188.

Change-Id: Ib338e34b363d7c729cc92202df020dc51033b719
(cherry picked from commit 05eb19b6e09065265358eec2db2ff3b42806dfc9)
Signed-off-by: jerryshao <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/aba52f44
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/aba52f44
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/aba52f44

Branch: refs/heads/branch-2.3
Commit: aba52f449730456d1a0fc885a80d0eec74b6e106
Parents: 4dc6719
Author: Marcelo Vanzin <[email protected]>
Authored: Tue May 8 14:32:04 2018 +0800
Committer: jerryshao <[email protected]>
Committed: Tue May 8 14:32:19 2018 +0800

----------------------------------------------------------------------
 .../scala/org/apache/spark/status/api/v1/ApiRootResource.scala  | 1 +
 .../org/apache/spark/deploy/history/HistoryServerSuite.scala    | 5 +++++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/aba52f44/core/src/main/scala/org/apache/spark/status/api/v1/ApiRootResource.scala
----------------------------------------------------------------------
diff --git 
a/core/src/main/scala/org/apache/spark/status/api/v1/ApiRootResource.scala 
b/core/src/main/scala/org/apache/spark/status/api/v1/ApiRootResource.scala
index ed9bdc6..20108ac 100644
--- a/core/src/main/scala/org/apache/spark/status/api/v1/ApiRootResource.scala
+++ b/core/src/main/scala/org/apache/spark/status/api/v1/ApiRootResource.scala
@@ -49,6 +49,7 @@ private[v1] class ApiRootResource extends ApiRequestContext {
   @Path("applications/{appId}")
   def application(): Class[OneApplicationResource] = 
classOf[OneApplicationResource]
 
+  @GET
   @Path("version")
   def version(): VersionInfo = new VersionInfo(org.apache.spark.SPARK_VERSION)
 

http://git-wip-us.apache.org/repos/asf/spark/blob/aba52f44/core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala
----------------------------------------------------------------------
diff --git 
a/core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala 
b/core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala
index 6856cfe..4c06193 100644
--- 
a/core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala
+++ 
b/core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala
@@ -294,6 +294,11 @@ class HistoryServerSuite extends SparkFunSuite with 
BeforeAndAfter with Matchers
     all (siteRelativeLinks) should startWith (uiRoot)
   }
 
+  test("/version api endpoint") {
+    val response = getUrl("version")
+    assert(response.contains(SPARK_VERSION))
+  }
+
   test("ajax rendered relative links are prefixed with uiRoot 
(spark.ui.proxyBase)") {
     val uiRoot = "/testwebproxybase"
     System.setProperty("spark.ui.proxyBase", uiRoot)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to