Repository: spark
Updated Branches:
refs/heads/branch-2.2 321b4f03b -> ecf5605a1
[SPARK-20354][CORE][REST-API] When I request access to the 'http:
//ip:port/api/v1/applications' link, return 'sparkUser' is empty in REST API.
## What changes were proposed in this pull request?
When I request access to the 'http: //ip:port/api/v1/applications' link, get
the json. I need the 'sparkUser' field specific value, because my Spark big
data management platform needs to filter through this field which user submits
the application to facilitate my administration and query, but the current
return of the json string is empty, causing me this Function can not be
achieved, that is, I do not know who the specific application is submitted by
this REST Api.
**current return json:**
[ {
"id" : "app-20170417152053-0000",
"name" : "KafkaWordCount",
"attempts" : [ {
"startTime" : "2017-04-17T07:20:51.395GMT",
"endTime" : "1969-12-31T23:59:59.999GMT",
"lastUpdated" : "2017-04-17T07:20:51.395GMT",
"duration" : 0,
**"sparkUser" : "",**
"completed" : false,
"endTimeEpoch" : -1,
"startTimeEpoch" : 1492413651395,
"lastUpdatedEpoch" : 1492413651395
} ]
} ]
**When I fix this question, return json:**
[ {
"id" : "app-20170417154201-0000",
"name" : "KafkaWordCount",
"attempts" : [ {
"startTime" : "2017-04-17T07:41:57.335GMT",
"endTime" : "1969-12-31T23:59:59.999GMT",
"lastUpdated" : "2017-04-17T07:41:57.335GMT",
"duration" : 0,
**"sparkUser" : "mr",**
"completed" : false,
"startTimeEpoch" : 1492414917335,
"endTimeEpoch" : -1,
"lastUpdatedEpoch" : 1492414917335
} ]
} ]
## How was this patch tested?
manual tests
Please review http://spark.apache.org/contributing.html before opening a pull
request.
Author: éå°é¾ 10207633 <[email protected]>
Author: guoxiaolong <[email protected]>
Author: guoxiaolongzte <[email protected]>
Closes #17656 from guoxiaolongzte/SPARK-20354.
(cherry picked from commit 1f81dda37cfc2049fabd6abd93ef3720d0aa03ea)
Signed-off-by: Marcelo Vanzin <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/ecf5605a
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/ecf5605a
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/ecf5605a
Branch: refs/heads/branch-2.2
Commit: ecf5605a104be67b29d29c00dc98ddab7975c9c1
Parents: 321b4f0
Author: éå°é¾ 10207633 <[email protected]>
Authored: Tue Apr 18 10:02:21 2017 -0700
Committer: Marcelo Vanzin <[email protected]>
Committed: Tue Apr 18 10:02:35 2017 -0700
----------------------------------------------------------------------
core/src/main/scala/org/apache/spark/ui/SparkUI.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/ecf5605a/core/src/main/scala/org/apache/spark/ui/SparkUI.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/ui/SparkUI.scala
b/core/src/main/scala/org/apache/spark/ui/SparkUI.scala
index 7d31ac5..bf4cf79 100644
--- a/core/src/main/scala/org/apache/spark/ui/SparkUI.scala
+++ b/core/src/main/scala/org/apache/spark/ui/SparkUI.scala
@@ -117,7 +117,7 @@ private[spark] class SparkUI private (
endTime = new Date(-1),
duration = 0,
lastUpdated = new Date(startTime),
- sparkUser = "",
+ sparkUser = getSparkUser,
completed = false
))
))
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]