public boolean tryAddExcludeDN(DatanodeInfo datanodeInfo, String cause) {
    boolean alreadyMarkedSlow = getExcludeDNs().containsKey(datanodeInfo);
    if (!alreadyMarkedSlow) {
      excludeDNsCache.put(datanodeInfo, EnvironmentEdgeManager.currentTime());
      LOG.info(
        "Added datanode: {} to exclude cache by [{}] success, current excludeDNsCache size={}",
        datanodeInfo, cause, excludeDNsCache.size());
      return true;
    }
    LOG.debug(
      "Try add datanode {} to exclude cache by [{}] failed, " + "current exclude DNs are {}",
      datanodeInfo, cause, getExcludeDNs().keySet());
    return false;
  }
Try to add a datanode to the regionserver excluding cache
@param datanodeInfo the datanode to be added to the excluded cache
@param cause        the cause that the datanode is hope to be excluded
@return True if the datanode is added to the regionserver excluding cache, false otherwise
hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/monitor/ExcludeDatanodeManager.java