code: private void populateDatanodeMetrics(ArrayList<DatanodeDescriptor> live,
        ArrayList<DatanodeDescriptor> dead) {
  
      DatanodeStatus status = FSNamesystemDatanodeHelper.getDatanodeStats(fsNameSystem,
          live, dead);
  
      // populate metrics
      numLiveNodes.set(status.numLive);
      numLiveExcludedNodes.set(status.numLiveExcluded);
      numLiveDecommissioningInProgressNodes.set(status.numLiveDecommissioningInProgress);
      numLiveDecommissioned.set(status.numLiveDecommissioned);
  
      numDeadNodes.set(status.numDead);
      numDeadExcludedNodes.set(status.numDeadExcluded);
      numDeadDecommissioningNotCompletedNodes.set(status.numDeadDecommissioningNotCompleted);
      numDeadDecommissioned.set(status.numDeadDecommissioned);
    }
docs: Pushes live/dead datanode metrics, and return the list of live nodes,
  so it can be reused.