HDFS-2363. Move datanodes size printing from FSNamesystem.metasave(..) to BlockManager. Contributed by Uma Maheswara Rao G
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1176733 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cc42ccf02a
commit
96f9fc9199
|
@ -765,6 +765,9 @@ Release 0.23.0 - Unreleased
|
|||
HDFS-2332. Add test for HADOOP-7629 (using an immutable FsPermission
|
||||
object as an RPC parameter fails). (todd)
|
||||
|
||||
HDFS-2363. Move datanodes size printing from FSNamesystem.metasave(..)
|
||||
to BlockManager. (Uma Maheswara Rao G via szetszwo)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HDFS-1458. Improve checkpoint performance by avoiding unnecessary image
|
||||
|
|
|
@ -308,6 +308,11 @@ public class BlockManager {
|
|||
/** Dump meta data to out. */
|
||||
public void metaSave(PrintWriter out) {
|
||||
assert namesystem.hasWriteLock();
|
||||
final List<DatanodeDescriptor> live = new ArrayList<DatanodeDescriptor>();
|
||||
final List<DatanodeDescriptor> dead = new ArrayList<DatanodeDescriptor>();
|
||||
datanodeManager.fetchDatanodes(live, dead, false);
|
||||
out.println("Live Datanodes: " + live.size());
|
||||
out.println("Dead Datanodes: " + dead.size());
|
||||
//
|
||||
// Dump contents of neededReplication
|
||||
//
|
||||
|
|
|
@ -564,11 +564,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|||
out.println(totalInodes + " files and directories, " + totalBlocks
|
||||
+ " blocks = " + (totalInodes + totalBlocks) + " total");
|
||||
|
||||
final List<DatanodeDescriptor> live = new ArrayList<DatanodeDescriptor>();
|
||||
final List<DatanodeDescriptor> dead = new ArrayList<DatanodeDescriptor>();
|
||||
blockManager.getDatanodeManager().fetchDatanodes(live, dead, false);
|
||||
out.println("Live Datanodes: "+live.size());
|
||||
out.println("Dead Datanodes: "+dead.size());
|
||||
blockManager.metaSave(out);
|
||||
|
||||
out.flush();
|
||||
|
|
Loading…
Reference in New Issue