@Override
  public void close() {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Stopping rpc client");
    }
    Collection<T> connToClose;
    synchronized (connections) {
      if (!running) {
        return;
      }
      running = false;
      connToClose = connections.values();
      connections.clear();
    }
    cleanupIdleConnectionTask.cancel(true);
    for (T conn : connToClose) {
      conn.shutdown();
    }
    closeInternal();
    for (T conn : connToClose) {
      conn.cleanupConnection();
    }
  }
Configure an hbase rpccontroller
@param controller              to configure
@param channelOperationTimeout timeout for operation
@return configured controller
hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java