@Override
  protected void afterExecute(Runnable r, Throwable t) {
    metrics.decActiveWorkerCount();
    super.afterExecute(r, t);
  }
A ThreadPoolExecutor customized for working with HBase thrift to update metrics before and after
the execution of a task.
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/THBaseThreadPoolExecutor.java