public class HBaseThriftTestingUtility extends Object
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
private int |
port |
private org.apache.hadoop.hbase.thrift.ThriftServer |
thriftServer |
private Exception |
thriftServerException |
private Thread |
thriftServerThread |
Constructor and Description |
---|
HBaseThriftTestingUtility() |
Modifier and Type | Method and Description |
---|---|
private org.apache.hadoop.hbase.thrift.ThriftServer |
createThriftServer(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.thrift.ThriftMetrics.ThriftServerType type)
create a new thrift server
|
int |
getServerPort() |
void |
startThriftServer(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.thrift.ThriftMetrics.ThriftServerType type)
start thrift server
|
private void |
startThriftServerThread(String[] args) |
void |
stopThriftServer() |
private void |
waitForThriftServer() |
private static final org.slf4j.Logger LOG
private Thread thriftServerThread
private volatile Exception thriftServerException
private org.apache.hadoop.hbase.thrift.ThriftServer thriftServer
private int port
public HBaseThriftTestingUtility()
public int getServerPort()
public void startThriftServer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.thrift.ThriftMetrics.ThriftServerType type) throws Exception
conf
- configurationtype
- the type of thrift serverException
- When starting the thrift server fails.private void startThriftServerThread(String[] args)
private org.apache.hadoop.hbase.thrift.ThriftServer createThriftServer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.thrift.ThriftMetrics.ThriftServerType type)
conf
- configurationtype
- the type of thrift serverprivate void waitForThriftServer() throws Exception
Exception
public void stopThriftServer() throws Exception
Exception
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.