private synchronized void warnStuckTasks() {
    if (rpcWarnTime > 0) {
      final long now = EnvironmentEdgeManager.currentTime();
      for (Iterator<TaskAndWeakRefPair> it = rpcTasks.iterator(); it.hasNext();) {
        TaskAndWeakRefPair pair = it.next();
        MonitoredTask stat = pair.get();
        if (
          (stat.getState() == MonitoredTaskImpl.State.RUNNING)
            && (now >= stat.getWarnTime() + rpcWarnTime)
        ) {
          LOG.warn("Task may be stuck: " + stat);
          stat.setWarnTime(now);
        }
      }
    }
  }
Create a task group which contains a series of monitored tasks for users to inquire about the
status
@param ignoreSubTasksInTaskMonitor whether to ignore to track(e.g. show/clear/expire) the task
                                   in the {@link TaskMonitor}
@param description                 description of the status
@return a group of monitored tasks
hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java