private ThriftServer createThriftServer(Configuration conf, ThriftServerType type) {
    switch (type) {
      case ONE:
        return new ThriftServer(conf);
      case TWO:
        return new org.apache.hadoop.hbase.thrift2.ThriftServer(conf);
      default:
        throw new IllegalArgumentException("Unknown type: " + type);
    }
  }
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