Repository: spark
Updated Branches:
  refs/heads/master f235df66a -> 31bd1dab1


[SPARK-23088][CORE] History server not showing incomplete/running applications

## What changes were proposed in this pull request?

History server not showing incomplete/running applications when 
spark.history.ui.maxApplications property is set to a value that is smaller 
than the total number of applications.

## How was this patch tested?

Verified manually against master and 2.2.2 branch.

Author: Paul Mackles <pmack...@adobe.com>

Closes #20335 from pmackles/SPARK-23088.


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

Branch: refs/heads/master
Commit: 31bd1dab1301d27a16c9d5d1b0b3301d618b0516
Parents: f235df6
Author: Paul Mackles <pmack...@adobe.com>
Authored: Tue Jan 30 11:15:27 2018 +0800
Committer: jerryshao <ss...@hortonworks.com>
Committed: Tue Jan 30 11:15:27 2018 +0800

----------------------------------------------------------------------
 .../main/resources/org/apache/spark/ui/static/historypage.js  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/31bd1dab/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..f0b2a5a 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,12 @@ $(document).ready(function() {
     requestedIncomplete = getParameterByName("showIncomplete", searchString);
     requestedIncomplete = (requestedIncomplete == "true" ? true : false);
 
-    $.getJSON("api/v1/applications?limit=" + appLimit, 
function(response,status,jqXHR) {
+    appParams = {
+      limit: appLimit,
+      status: (requestedIncomplete ? "running" : "completed")
+    };
+
+    $.getJSON("api/v1/applications", appParams, 
function(response,status,jqXHR) {
       var array = [];
       var hasMultipleAttempts = false;
       for (i in response) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to