You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by su...@apache.org on 2019/11/28 19:13:31 UTC
[hadoop] branch trunk updated: HDFS-15013. Reduce NameNode overview
tab response time. Contributed by HuangTao.
This is an automated email from the ASF dual-hosted git repository.
surendralilhore pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 44f7b91 HDFS-15013. Reduce NameNode overview tab response time. Contributed by HuangTao.
44f7b91 is described below
commit 44f7b9159d8eec151f199231bafe0677f9383dc3
Author: Surendra Singh Lilhore <su...@apache.org>
AuthorDate: Fri Nov 29 00:42:31 2019 +0530
HDFS-15013. Reduce NameNode overview tab response time. Contributed by HuangTao.
---
.../hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js
index d12a9fb..0d9de3e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js
@@ -65,8 +65,9 @@
};
var data = {};
+ var non_ha = false;
- $.ajax({'url': '/conf', 'dataType': 'xml', 'async': false}).done(
+ $.ajax({'url': '/conf', 'dataType': 'xml', 'async': true}).done(
function(d) {
var $xml = $(d);
var namespace, nnId;
@@ -80,6 +81,8 @@
});
if (namespace && nnId) {
data['HAInfo'] = {"Namespace": namespace, "NamenodeID": nnId};
+ } else {
+ non_ha = true;
}
});
@@ -109,7 +112,17 @@
data.fs.ObjectsTotal = data.fs.FilesTotal + data.fs.BlocksTotal;
- render();
+ var wait_for_conf = setInterval(function() {
+ if (non_ha ||
+ (('HAInfo' in data) &&
+ ("Namespace" in data['HAInfo']) &&
+ ("NamenodeID" in data['HAInfo'])
+ )
+ ) {
+ render();
+ clearInterval(wait_for_conf);
+ }
+ }, 5);
}),
function (url, jqxhr, text, err) {
show_err_msg('<p>Failed to retrieve data from ' + url + ', cause: ' + err + '</p>');
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org