@Override
  protected void chore() {
    try {
      // thread pool monitor
      Map<String, ExecutorStatus> statuses = service.getAllExecutorStatuses();
      for (Map.Entry<String, ExecutorStatus> statusEntry : statuses.entrySet()) {
        String name = statusEntry.getKey();
        // Executor's name is generate by ExecutorType#getExecutorName
        // include ExecutorType & Servername(split by '-'), here we only need the ExecutorType
        String poolName = name.split("-")[0];
        ExecutorStatus status = statusEntry.getValue();
        MutableGaugeLong queued = metricsRegistry.getGauge(poolName + "_queued", 0L);
        MutableGaugeLong running = metricsRegistry.getGauge(poolName + "_running", 0L);
        int queueSize = status.getQueuedEvents().size();
        int runningSize = status.getRunning().size();
        if (queueSize > 0) {
          LOG.warn("{}'s size info, queued: {}, running: {}", poolName, queueSize, runningSize);
        }
        queued.set(queueSize);
        running.set(runningSize);
      }
    } catch (Throwable e) {
      LOG.error(e.getMessage(), e);
    }
  }
The Class ExecutorStatusChore for collect Executor status info periodically and report to metrics
system
hbase-server/src/main/java/org/apache/hadoop/hbase/ExecutorStatusChore.java