public void stopThriftServer() throws Exception {
    LOG.debug("Stopping Thrift Server");
    thriftServer.stop();
    thriftServerThread.join();
    if (thriftServerException != null) {
      LOG.error("HBase Thrift server threw an exception ", thriftServerException);
      throw new Exception(thriftServerException);
    }
  }
create a new thrift server
@param conf configuration
@param type the type of thrift server
@return the instance of ThriftServer
hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/HBaseThriftTestingUtility.java