public abstract class AbstractTestIPC extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
AbstractTestIPC.FailingSimpleRpcServer |
Modifier and Type | Field and Description |
---|---|
private static org.apache.hadoop.hbase.KeyValue |
CELL |
private static byte[] |
CELL_BYTES |
protected static org.apache.hadoop.conf.Configuration |
CONF |
private static org.slf4j.Logger |
LOG |
Class<? extends org.apache.hadoop.hbase.ipc.RpcServer> |
rpcServerImpl |
io.opentelemetry.sdk.testing.junit4.OpenTelemetryRule |
traceRule |
Constructor and Description |
---|
AbstractTestIPC() |
Modifier and Type | Method and Description |
---|---|
private void |
assertRemoteSpan() |
private static org.hamcrest.Matcher<io.opentelemetry.sdk.trace.data.SpanData> |
buildIpcClientSpanAttributesMatcher(String packageAndService,
String methodName,
InetSocketAddress isa) |
private static org.hamcrest.Matcher<io.opentelemetry.sdk.trace.data.SpanData> |
buildIpcClientSpanMatcher(String packageAndService,
String methodName) |
private static org.hamcrest.Matcher<io.opentelemetry.sdk.trace.data.SpanData> |
buildIpcServerSpanAttributesMatcher(String packageAndService,
String methodName) |
private static org.hamcrest.Matcher<io.opentelemetry.sdk.trace.data.SpanData> |
buildIpcServerSpanMatcher(String packageAndService,
String methodName) |
private static String |
buildIpcSpanName(String packageAndService,
String methodName) |
protected abstract org.apache.hadoop.hbase.ipc.AbstractRpcClient<?> |
createBadAuthRpcClient(org.apache.hadoop.conf.Configuration conf) |
protected abstract org.apache.hadoop.hbase.ipc.AbstractRpcClient<?> |
createRpcClient(org.apache.hadoop.conf.Configuration conf) |
protected abstract org.apache.hadoop.hbase.ipc.AbstractRpcClient<?> |
createRpcClientNoCodec(org.apache.hadoop.conf.Configuration conf) |
protected abstract org.apache.hadoop.hbase.ipc.AbstractRpcClient<?> |
createRpcClientRTEDuringConnectionSetup(org.apache.hadoop.conf.Configuration conf) |
protected org.apache.hadoop.hbase.ipc.RpcServer |
createRpcServer(org.apache.hadoop.hbase.Server server,
String name,
List<org.apache.hadoop.hbase.ipc.RpcServer.BlockingServiceAndInterface> services,
InetSocketAddress bindAddress,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.ipc.RpcScheduler scheduler) |
private org.apache.hadoop.hbase.ipc.RpcServer |
createRpcServer(String name,
List<org.apache.hadoop.hbase.ipc.RpcServer.BlockingServiceAndInterface> services,
InetSocketAddress bindAddress,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.ipc.RpcScheduler scheduler) |
protected org.apache.hadoop.hbase.ipc.RpcServer |
createTestFailingRpcServer(String name,
List<org.apache.hadoop.hbase.ipc.RpcServer.BlockingServiceAndInterface> services,
InetSocketAddress bindAddress,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.ipc.RpcScheduler scheduler) |
private IOException |
doBadPreableHeaderCall(org.apache.hadoop.hbase.shaded.ipc.protobuf.generated.TestRpcServiceProtos.TestProtobufRpcProto.BlockingInterface stub) |
void |
setUpBeforeTest() |
void |
testAsyncEcho() |
void |
testAsyncRemoteError() |
void |
testAsyncTimeout() |
void |
testBadPreambleHeader() |
void |
testCompressCellBlock()
It is hard to verify the compression is actually happening under the wraps.
|
void |
testConnectionCloseWithOutstandingRPCs()
Tests that the connection closing is handled by the client with outstanding RPC calls
|
void |
testGetConnectionRegistry()
Testcase for getting connection registry information through connection preamble header, see
HBASE-25051 for more details.
|
void |
testGetConnectionRegistryError()
Test server does not support getting connection registry information through connection
preamble header, i.e, a new client connecting to an old server.
|
void |
testNoCodec()
Ensure we do not HAVE TO HAVE a codec.
|
void |
testRemoteError() |
void |
testRpcMaxRequestSize()
Tests that the rpc scheduler is called when requests arrive.
|
void |
testRpcScheduler()
Tests that the rpc scheduler is called when requests arrive.
|
void |
testRpcServerForNotNullRemoteAddressInCallObject()
Tests that the RpcServer creates & dispatches CallRunner object to scheduler with non-null
remoteAddress set to its Call Object
|
void |
testRTEDuringConnectionSetup() |
void |
testTimeout() |
void |
testTracingErrorIpc() |
void |
testTracingSuccessIpc() |
private io.opentelemetry.sdk.trace.data.SpanData |
waitSpan(org.hamcrest.Matcher<io.opentelemetry.sdk.trace.data.SpanData> matcher) |
private static final org.slf4j.Logger LOG
private static final byte[] CELL_BYTES
private static final org.apache.hadoop.hbase.KeyValue CELL
protected static final org.apache.hadoop.conf.Configuration CONF
public io.opentelemetry.sdk.testing.junit4.OpenTelemetryRule traceRule
public Class<? extends org.apache.hadoop.hbase.ipc.RpcServer> rpcServerImpl
public AbstractTestIPC()
protected org.apache.hadoop.hbase.ipc.RpcServer createRpcServer(org.apache.hadoop.hbase.Server server, String name, List<org.apache.hadoop.hbase.ipc.RpcServer.BlockingServiceAndInterface> services, InetSocketAddress bindAddress, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.ipc.RpcScheduler scheduler) throws IOException
IOException
private org.apache.hadoop.hbase.ipc.RpcServer createRpcServer(String name, List<org.apache.hadoop.hbase.ipc.RpcServer.BlockingServiceAndInterface> services, InetSocketAddress bindAddress, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.ipc.RpcScheduler scheduler) throws IOException
IOException
protected abstract org.apache.hadoop.hbase.ipc.AbstractRpcClient<?> createRpcClientNoCodec(org.apache.hadoop.conf.Configuration conf)
public void setUpBeforeTest()
public void testNoCodec() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
protected abstract org.apache.hadoop.hbase.ipc.AbstractRpcClient<?> createRpcClient(org.apache.hadoop.conf.Configuration conf)
public void testCompressCellBlock() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
protected abstract org.apache.hadoop.hbase.ipc.AbstractRpcClient<?> createRpcClientRTEDuringConnectionSetup(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public void testRTEDuringConnectionSetup() throws Exception
Exception
public void testRpcScheduler() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException, InterruptedException
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
InterruptedException
public void testRpcMaxRequestSize() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
public void testRpcServerForNotNullRemoteAddressInCallObject() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
public void testRemoteError() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
public void testTimeout() throws IOException
IOException
protected org.apache.hadoop.hbase.ipc.RpcServer createTestFailingRpcServer(String name, List<org.apache.hadoop.hbase.ipc.RpcServer.BlockingServiceAndInterface> services, InetSocketAddress bindAddress, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.ipc.RpcScheduler scheduler) throws IOException
IOException
public void testConnectionCloseWithOutstandingRPCs() throws InterruptedException, IOException
InterruptedException
IOException
public void testAsyncEcho() throws IOException
IOException
public void testAsyncRemoteError() throws IOException
IOException
public void testAsyncTimeout() throws IOException
IOException
private io.opentelemetry.sdk.trace.data.SpanData waitSpan(org.hamcrest.Matcher<io.opentelemetry.sdk.trace.data.SpanData> matcher)
private static String buildIpcSpanName(String packageAndService, String methodName)
private static org.hamcrest.Matcher<io.opentelemetry.sdk.trace.data.SpanData> buildIpcClientSpanMatcher(String packageAndService, String methodName)
private static org.hamcrest.Matcher<io.opentelemetry.sdk.trace.data.SpanData> buildIpcServerSpanMatcher(String packageAndService, String methodName)
private static org.hamcrest.Matcher<io.opentelemetry.sdk.trace.data.SpanData> buildIpcClientSpanAttributesMatcher(String packageAndService, String methodName, InetSocketAddress isa)
private static org.hamcrest.Matcher<io.opentelemetry.sdk.trace.data.SpanData> buildIpcServerSpanAttributesMatcher(String packageAndService, String methodName)
private void assertRemoteSpan()
public void testTracingSuccessIpc() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
public void testTracingErrorIpc() throws IOException
IOException
protected abstract org.apache.hadoop.hbase.ipc.AbstractRpcClient<?> createBadAuthRpcClient(org.apache.hadoop.conf.Configuration conf)
private IOException doBadPreableHeaderCall(org.apache.hadoop.hbase.shaded.ipc.protobuf.generated.TestRpcServiceProtos.TestProtobufRpcProto.BlockingInterface stub)
public void testBadPreambleHeader() throws Exception
Exception
public void testGetConnectionRegistry() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
public void testGetConnectionRegistryError() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.