Skip to content

Commit 05eb19b

Browse files
Marcelo Vanzinjerryshao
authored andcommitted
[SPARK-24188][CORE] Restore "/version" API endpoint.
It was missing the jax-rs annotation. Author: Marcelo Vanzin <vanzin@cloudera.com> Closes #21245 from vanzin/SPARK-24188. Change-Id: Ib338e34b363d7c729cc92202df020dc51033b719
1 parent cd12c5c commit 05eb19b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

core/src/main/scala/org/apache/spark/status/api/v1/ApiRootResource.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ private[v1] class ApiRootResource extends ApiRequestContext {
4949
@Path("applications/{appId}")
5050
def application(): Class[OneApplicationResource] = classOf[OneApplicationResource]
5151

52+
@GET
5253
@Path("version")
5354
def version(): VersionInfo = new VersionInfo(org.apache.spark.SPARK_VERSION)
5455

core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,11 @@ class HistoryServerSuite extends SparkFunSuite with BeforeAndAfter with Matchers
296296
all (siteRelativeLinks) should startWith (uiRoot)
297297
}
298298

299+
test("/version api endpoint") {
300+
val response = getUrl("version")
301+
assert(response.contains(SPARK_VERSION))
302+
}
303+
299304
test("ajax rendered relative links are prefixed with uiRoot (spark.ui.proxyBase)") {
300305
val uiRoot = "/testwebproxybase"
301306
System.setProperty("spark.ui.proxyBase", uiRoot)

0 commit comments

Comments
 (0)