Package org.apache.hadoop.hbase.thrift
Class TestThriftServerCmdLine
java.lang.Object
org.apache.hadoop.hbase.thrift.TestThriftServerCmdLine
- Direct Known Subclasses:
TestThrift2ServerCmdLine
Start the HBase Thrift server on a random port through the command-line interface and talk to it
from client side.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
protected final org.apache.hadoop.hbase.thrift.ImplType
private static final org.slf4j.Logger
protected boolean
protected boolean
protected boolean
protected static boolean
protected static final HBaseTestingUtil
-
Constructor Summary
ConstructorDescriptionTestThriftServerCmdLine
(org.apache.hadoop.hbase.thrift.ImplType implType, boolean specifyFramed, boolean specifyBindIP, boolean specifyCompact) -
Method Summary
Modifier and TypeMethodDescription(package private) static ThriftServerRunner
createBoundServer
(Supplier<org.apache.hadoop.hbase.thrift.ThriftServer> thriftServerSupplier) (package private) static ThriftServerRunner
createBoundServer
(Supplier<org.apache.hadoop.hbase.thrift.ThriftServer> thriftServerSupplier, boolean protocolPortClash, boolean infoPortClash) (package private) static ThriftServerRunner
createBoundServer
(Supplier<org.apache.hadoop.hbase.thrift.ThriftServer> thriftServerSupplier, org.apache.hadoop.hbase.thrift.ImplType implType, boolean specifyFramed, boolean specifyCompact, boolean specifyBindIP) (package private) static ThriftServerRunner
createBoundServer
(Supplier<org.apache.hadoop.hbase.thrift.ThriftServer> thriftServerSupplier, org.apache.hadoop.hbase.thrift.ImplType implType, boolean specifyFramed, boolean specifyCompact, boolean specifyBindIP, boolean protocolPortClash, boolean infoPortClash) static Collection<Object[]>
private String
(package private) static int
protected Supplier<org.apache.hadoop.hbase.thrift.ThriftServer>
private static boolean
isBindException
(Exception cmdLineException) static void
(package private) static ThriftServerRunner
startCmdLineThread
(Supplier<org.apache.hadoop.hbase.thrift.ThriftServer> supplier, String[] args) protected void
talkToThriftServer
(int port) static void
void
-
Field Details
-
CLASS_RULE
-
LOG
-
implType
-
specifyFramed
-
specifyBindIP
-
specifyCompact
-
TEST_UTIL
-
tableCreated
-
-
Constructor Details
-
TestThriftServerCmdLine
public TestThriftServerCmdLine(org.apache.hadoop.hbase.thrift.ImplType implType, boolean specifyFramed, boolean specifyBindIP, boolean specifyCompact)
-
-
Method Details
-
getParameters
-
getParametersString
-
setUpBeforeClass
- Throws:
Exception
-
tearDownAfterClass
- Throws:
Exception
-
startCmdLineThread
static ThriftServerRunner startCmdLineThread(Supplier<org.apache.hadoop.hbase.thrift.ThriftServer> supplier, String[] args) -
getRandomPort
-
getThriftServerSupplier
-
createBoundServer
static ThriftServerRunner createBoundServer(Supplier<org.apache.hadoop.hbase.thrift.ThriftServer> thriftServerSupplier) throws Exception - Throws:
Exception
-
createBoundServer
static ThriftServerRunner createBoundServer(Supplier<org.apache.hadoop.hbase.thrift.ThriftServer> thriftServerSupplier, boolean protocolPortClash, boolean infoPortClash) throws Exception - Throws:
Exception
-
createBoundServer
static ThriftServerRunner createBoundServer(Supplier<org.apache.hadoop.hbase.thrift.ThriftServer> thriftServerSupplier, org.apache.hadoop.hbase.thrift.ImplType implType, boolean specifyFramed, boolean specifyCompact, boolean specifyBindIP) throws Exception - Throws:
Exception
-
createBoundServer
static ThriftServerRunner createBoundServer(Supplier<org.apache.hadoop.hbase.thrift.ThriftServer> thriftServerSupplier, org.apache.hadoop.hbase.thrift.ImplType implType, boolean specifyFramed, boolean specifyCompact, boolean specifyBindIP, boolean protocolPortClash, boolean infoPortClash) throws Exception - Parameters:
protocolPortClash
- This param is just so we can manufacture a port clash so we can test the code does the right thing when this happens during actual test runs. Ugly but works.- Throws:
Exception
- See Also:
-
isBindException
-
testRunThriftServer
- Throws:
Exception
-
talkToThriftServer
- Throws:
Exception
-