aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/resources
diff options
context:
space:
mode:
authorAlex Bozarth <ajbozart@us.ibm.com>2016-08-30 16:33:54 -0500
committerTom Graves <tgraves@yahoo-inc.com>2016-08-30 16:33:54 -0500
commitf7beae6da02e6b70a34c714e93136becbde7679b (patch)
tree18c0c1d197da796e636a5479e6347cf5d3480357 /core/src/main/resources
parent02ac379e8645ce5d32e033f6683136da16fbe584 (diff)
downloadspark-f7beae6da02e6b70a34c714e93136becbde7679b.tar.gz
spark-f7beae6da02e6b70a34c714e93136becbde7679b.tar.bz2
spark-f7beae6da02e6b70a34c714e93136becbde7679b.zip
[SPARK-17243][WEB UI] Spark 2.0 History Server won't load with very large application history
## What changes were proposed in this pull request? With the new History Server the summary page loads the application list via the the REST API, this makes it very slow to impossible to load with large (10K+) application history. This pr fixes this by adding the `spark.history.ui.maxApplications` conf to limit the number of applications the History Server displays. This is accomplished using a new optional `limit` param for the `applications` api. (Note this only applies to what the summary page displays, all the Application UI's are still accessible if the user knows the App ID and goes to the Application UI directly.) I've also added a new test for the `limit` param in `HistoryServerSuite.scala` ## How was this patch tested? Manual testing and dev/run-tests Author: Alex Bozarth <ajbozart@us.ibm.com> Closes #14835 from ajbozarth/spark17243.
Diffstat (limited to 'core/src/main/resources')
-rw-r--r--core/src/main/resources/org/apache/spark/ui/static/historypage.js8
1 files changed, 7 insertions, 1 deletions
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 5b9afb59ef..c8094005c6 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
@@ -15,6 +15,12 @@
* limitations under the License.
*/
+var appLimit = -1;
+
+function setAppLimit(val) {
+ appLimit = val;
+}
+
function makeIdNumeric(id) {
var strs = id.split("_");
if (strs.length < 3) {
@@ -89,7 +95,7 @@ $(document).ready(function() {
requestedIncomplete = getParameterByName("showIncomplete", searchString);
requestedIncomplete = (requestedIncomplete == "true" ? true : false);
- $.getJSON("api/v1/applications", function(response,status,jqXHR) {
+ $.getJSON("api/v1/applications?limit=" + appLimit, function(response,status,jqXHR) {
var array = [];
var hasMultipleAttempts = false;
for (i in response) {