HDFS-9065. Include commas on # of files, blocks, total filesystem objects in NN Web UI. Contributed by Daniel Templeton.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d777757d Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d777757d Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d777757d Branch: refs/heads/HADOOP-11890 Commit: d777757d21c15942275bff6bb98876637950d73f Parents: 76957a4 Author: Haohui Mai <[email protected]> Authored: Mon Sep 14 20:26:56 2015 -0700 Committer: Haohui Mai <[email protected]> Committed: Mon Sep 14 20:26:56 2015 -0700 ---------------------------------------------------------------------- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html | 2 +- .../hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js | 3 +++ .../hadoop-hdfs/src/main/webapps/static/dfs-dust.js | 4 ++++ 4 files changed, 11 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/d777757d/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 35dcd80..f0bc026 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -912,6 +912,9 @@ Release 2.8.0 - UNRELEASED HDFS-9010. Replace NameNode.DEFAULT_PORT with HdfsClientConfigKeys. DFS_NAMENODE_RPC_PORT_DEFAULT config key. (Mingliang Liu via wheat9) + HDFS-9065. Include commas on # of files, blocks, total filesystem objects + in NN Web UI. (Daniel Templeton via wheat9) + OPTIMIZATIONS HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than http://git-wip-us.apache.org/repos/asf/hadoop/blob/d777757d/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html index 36f8bfe..ad3ac0d 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html @@ -145,7 +145,7 @@ <p> {#fs} - {FilesTotal} files and directories, {BlocksTotal} blocks = {@math key="{FilesTotal}" method="add" operand="{BlocksTotal}"/} total filesystem object(s). + {FilesTotal|fmt_number} files and directories, {BlocksTotal|fmt_number} blocks = {ObjectsTotal|fmt_number} total filesystem object(s). {#helper_fs_max_objects/} {/fs} </p> http://git-wip-us.apache.org/repos/asf/hadoop/blob/d777757d/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js ---------------------------------------------------------------------- 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 9bc1b5d..cc3afcd 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 @@ -103,6 +103,9 @@ b.capacityUsedPercentage = b.capacityUsed * 100.0 / b.capacityTotal; b.capacityRemainingPercentage = b.capacityRemaining * 100.0 / b.capacityTotal; } + + data.fs.ObjectsTotal = data.fs.FilesTotal + data.fs.BlocksTotal; + render(); }), function (url, jqxhr, text, err) { http://git-wip-us.apache.org/repos/asf/hadoop/blob/d777757d/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dfs-dust.js ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dfs-dust.js b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dfs-dust.js index 466e058..1f37d21 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dfs-dust.js +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dfs-dust.js @@ -92,6 +92,10 @@ 'helper_to_acl_bit': function (v) { return v ? '+' : ""; + }, + + 'fmt_number': function (v) { + return v.toLocaleString(); } }; $.extend(dust.filters, filters);
