svn merge -c 1176733 from trunk for HDFS-2363.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1176737 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4f04805d42
commit
d04e6af4b7
|
@ -689,6 +689,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
|
||||
|
|
|
@ -306,6 +306,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
|
||||
//
|
||||
|
|
|
@ -537,11 +537,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