@Override
  protected void beforeExecute(Thread t, Runnable r) {
    super.beforeExecute(t, r);
    metrics.incActiveWorkerCount();
  }
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