code: private void datanodeDump(PrintWriter out) {
      readLock();
      try {
        synchronized (datanodeMap) {
          out.println("Metasave: Number of datanodes: " + datanodeMap.size());
          for (Iterator<DatanodeDescriptor> it = datanodeMap.values().iterator(); it.hasNext();) {
            DatanodeDescriptor node = it.next();
            out.println(node.dumpDatanode());
          }
        }
      } finally {
        readUnlock();
      }
    }
docs: Prints information about all datanodes.