HDFS-3358. Specify explicitly that the NN UI status total is talking of persistent objects on heap. Contributed by Harsh J. (harsh)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1416245 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Harsh J 2012-12-02 20:05:54 +00:00
parent 88eea21572
commit 5954e4f1ac
4 changed files with 8 additions and 3 deletions

View File

@ -176,6 +176,9 @@ Trunk (Unreleased)
HDFS-4209. Clean up the addNode/addChild/addChildNoQuotaCheck methods in HDFS-4209. Clean up the addNode/addChild/addChildNoQuotaCheck methods in
FSDirectory and INodeDirectory. (szetszwo) FSDirectory and INodeDirectory. (szetszwo)
HDFS-3358. Specify explicitly that the NN UI status total is talking
of persistent objects on heap. (harsh)
OPTIMIZATIONS OPTIMIZATIONS
BUG FIXES BUG FIXES

View File

@ -1030,7 +1030,8 @@ private void metaSave(PrintWriter out) {
long totalInodes = this.dir.totalInodes(); long totalInodes = this.dir.totalInodes();
long totalBlocks = this.getBlocksTotal(); long totalBlocks = this.getBlocksTotal();
out.println(totalInodes + " files and directories, " + totalBlocks out.println(totalInodes + " files and directories, " + totalBlocks
+ " blocks = " + (totalInodes + totalBlocks) + " total"); + " blocks = " + (totalInodes + totalBlocks)
+ " total filesystem objects");
blockManager.metaSave(out); blockManager.metaSave(out);
} }

View File

@ -102,7 +102,7 @@ static String getInodeLimitText(FSNamesystem fsn) {
long usedNonHeap = (totalNonHeap * 100) / commitedNonHeap; long usedNonHeap = (totalNonHeap * 100) / commitedNonHeap;
String str = "<div>" + inodes + " files and directories, " + blocks + " blocks = " String str = "<div>" + inodes + " files and directories, " + blocks + " blocks = "
+ (inodes + blocks) + " total"; + (inodes + blocks) + " total filesystem objects";
if (maxobjects != 0) { if (maxobjects != 0) {
long pct = ((inodes + blocks) * 100) / maxobjects; long pct = ((inodes + blocks) * 100) / maxobjects;
str += " / " + maxobjects + " (" + pct + "%)"; str += " / " + maxobjects + " (" + pct + "%)";

View File

@ -92,7 +92,8 @@ public void testMetaSave() throws IOException, InterruptedException {
DataInputStream in = new DataInputStream(fstream); DataInputStream in = new DataInputStream(fstream);
BufferedReader reader = new BufferedReader(new InputStreamReader(in)); BufferedReader reader = new BufferedReader(new InputStreamReader(in));
String line = reader.readLine(); String line = reader.readLine();
assertTrue(line.equals("3 files and directories, 2 blocks = 5 total")); assertTrue(line.equals(
"3 files and directories, 2 blocks = 5 total filesystem objects"));
line = reader.readLine(); line = reader.readLine();
assertTrue(line.equals("Live Datanodes: 1")); assertTrue(line.equals("Live Datanodes: 1"));
line = reader.readLine(); line = reader.readLine();