code: private boolean checkZoneRequirement(HashMap<Integer, Integer> requiredRepFactor, int zoneId) {
          if(requiredRepFactor.containsKey(zoneId)) {
              if(requiredRepFactor.get(zoneId) == 0) {
                  return false;
              } else {
                  requiredRepFactor.put(zoneId, requiredRepFactor.get(zoneId) - 1);
                  return true;
              }
          }
          return false;
  
      }
docs: Check if we still need more nodes from the given zone and reduce the
  zoneReplicationFactor count accordingly.
  
  @param requiredRepFactor
  @param zoneId
  @return