You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by js...@apache.org on 2018/03/20 02:07:47 UTC
spark git commit: [SPARK-23644][CORE][UI][BACKPORT-2.3] Use absolute
path for REST call in SHS
Repository: spark
Updated Branches:
refs/heads/branch-2.3 5c1c03d08 -> 2f82c037d
[SPARK-23644][CORE][UI][BACKPORT-2.3] Use absolute path for REST call in SHS
## What changes were proposed in this pull request?
SHS is using a relative path for the REST API call to get the list of the application is a relative path call. In case of the SHS being consumed through a proxy, it can be an issue if the path doesn't end with a "/".
Therefore, we should use an absolute path for the REST call as it is done for all the other resources.
## How was this patch tested?
manual tests
Before the change:

After the change:

Author: Marco Gaido <ma...@gmail.com>
Closes #20847 from mgaido91/SPARK-23644_2.3.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/2f82c037
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/2f82c037
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/2f82c037
Branch: refs/heads/branch-2.3
Commit: 2f82c037d90114705c0d0bd0bd7f82215aecfe3b
Parents: 5c1c03d
Author: Marco Gaido <ma...@gmail.com>
Authored: Tue Mar 20 10:07:27 2018 +0800
Committer: jerryshao <ss...@hortonworks.com>
Committed: Tue Mar 20 10:07:27 2018 +0800
----------------------------------------------------------------------
.../src/main/resources/org/apache/spark/ui/static/historypage.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/2f82c037/core/src/main/resources/org/apache/spark/ui/static/historypage.js
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org/apache/spark/ui/static/historypage.js b/core/src/main/resources/org/apache/spark/ui/static/historypage.js
index 2cde66b..16d59be 100644
--- a/core/src/main/resources/org/apache/spark/ui/static/historypage.js
+++ b/core/src/main/resources/org/apache/spark/ui/static/historypage.js
@@ -108,7 +108,7 @@ $(document).ready(function() {
requestedIncomplete = getParameterByName("showIncomplete", searchString);
requestedIncomplete = (requestedIncomplete == "true" ? true : false);
- $.getJSON("api/v1/applications?limit=" + appLimit, function(response,status,jqXHR) {
+ $.getJSON(uiRoot + "/api/v1/applications?limit=" + appLimit, function(response,status,jqXHR) {
var array = [];
var hasMultipleAttempts = false;
for (i in response) {
@@ -146,7 +146,7 @@ $(document).ready(function() {
"showCompletedColumns": !requestedIncomplete,
}
- $.get("static/historypage-template.html", function(template) {
+ $.get(uiRoot + "/static/historypage-template.html", function(template) {
var sibling = historySummary.prev();
historySummary.detach();
var apps = $(Mustache.render($(template).filter("#history-summary-template").html(),data));
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org