Details
Description
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);
Logically all the dataNode related logic can be moved to BlockManager.
So, here metaSave API is getting the DataNodes details from blockManager to FsNameSystem and after printing the details again it is giving the control to blockManager.
It will be good to move the DNs size printing code also to BlockManager.