HDFS-2708. Stats for the # of blocks per DN. Contributed by Aaron T. Myers.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1326040 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ca3ed5e320
commit
204f4d83f3
|
@ -249,6 +249,8 @@ Release 2.0.0 - UNRELEASED
|
|||
HDFS-3259. NameNode#initializeSharedEdits should populate shared edits dir
|
||||
with edit log segments. (atm)
|
||||
|
||||
HDFS-2708. Stats for the # of blocks per DN. (atm)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HDFS-2477. Optimize computing the diff between a block report and the
|
||||
|
|
|
@ -5051,6 +5051,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|||
innerinfo.put("adminState", node.getAdminState().toString());
|
||||
innerinfo.put("nonDfsUsedSpace", node.getNonDfsUsed());
|
||||
innerinfo.put("capacity", node.getCapacity());
|
||||
innerinfo.put("numBlocks", node.numBlocks());
|
||||
info.put(node.getHostName(), innerinfo);
|
||||
}
|
||||
return JSON.toString(info);
|
||||
|
|
|
@ -101,6 +101,8 @@ public class TestNameNodeMXBean {
|
|||
assertTrue(((Long)liveNode.get("nonDfsUsedSpace")) > 0);
|
||||
assertTrue(liveNode.containsKey("capacity"));
|
||||
assertTrue(((Long)liveNode.get("capacity")) > 0);
|
||||
assertTrue(liveNode.containsKey("numBlocks"));
|
||||
assertTrue(((Long)liveNode.get("numBlocks")) == 0);
|
||||
}
|
||||
Assert.assertEquals(fsn.getLiveNodes(), alivenodeinfo);
|
||||
// get attribute deadnodeinfo
|
||||
|
|
Loading…
Reference in New Issue