Package org.apache.hadoop.hbase.ipc
Class AbstractTestIPC
java.lang.Object
org.apache.hadoop.hbase.ipc.AbstractTestIPC
- Direct Known Subclasses:
TestBlockingIPC
,TestNettyIPC
,TestNettyTlsIPC
Some basic ipc tests.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.apache.hadoop.hbase.KeyValue
private static final byte[]
protected static final org.apache.hadoop.conf.Configuration
private static final org.slf4j.Logger
Class<? extends org.apache.hadoop.hbase.ipc.RpcServer>
io.opentelemetry.sdk.testing.junit4.OpenTelemetryRule
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
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) 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
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) 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
void
void
void
void
void
It is hard to verify the compression is actually happening under the wraps.void
Tests that the connection closing is handled by the client with outstanding RPC callsvoid
Testcase for getting connection registry information through connection preamble header, see HBASE-25051 for more details.void
Test server does not support getting connection registry information through connection preamble header, i.e, a new client connecting to an old server.void
Ensure we do not HAVE TO HAVE a codec.void
void
Tests that the rpc scheduler is called when requests arrive.void
Tests that the rpc scheduler is called when requests arrive.void
Tests that the RpcServer creates & dispatches CallRunner object to scheduler with non-null remoteAddress set to its Call Objectvoid
void
void
void
private io.opentelemetry.sdk.trace.data.SpanData
waitSpan
(org.hamcrest.Matcher<io.opentelemetry.sdk.trace.data.SpanData> matcher)
-
Field Details
-
LOG
-
CELL_BYTES
-
CELL
-
CONF
-
traceRule
-
rpcServerImpl
-
-
Constructor Details
-
AbstractTestIPC
public AbstractTestIPC()
-
-
Method Details
-
createRpcServer
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 - Throws:
IOException
-
createRpcServer
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 - Throws:
IOException
-
createRpcClientNoCodec
protected abstract org.apache.hadoop.hbase.ipc.AbstractRpcClient<?> createRpcClientNoCodec(org.apache.hadoop.conf.Configuration conf) -
setUpBeforeTest
-
testNoCodec
public void testNoCodec() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceExceptionEnsure we do not HAVE TO HAVE a codec.- Throws:
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
createRpcClient
protected abstract org.apache.hadoop.hbase.ipc.AbstractRpcClient<?> createRpcClient(org.apache.hadoop.conf.Configuration conf) -
testCompressCellBlock
public void testCompressCellBlock() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceExceptionIt is hard to verify the compression is actually happening under the wraps. Hope that if unsupported, we'll get an exception out of some time (meantime, have to trace it manually to confirm that compression is happening down in the client and server).- Throws:
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
createRpcClientRTEDuringConnectionSetup
protected abstract org.apache.hadoop.hbase.ipc.AbstractRpcClient<?> createRpcClientRTEDuringConnectionSetup(org.apache.hadoop.conf.Configuration conf) throws IOException - Throws:
IOException
-
testRTEDuringConnectionSetup
- Throws:
Exception
-
testRpcScheduler
public void testRpcScheduler() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException, InterruptedExceptionTests that the rpc scheduler is called when requests arrive.- Throws:
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
InterruptedException
-
testRpcMaxRequestSize
public void testRpcMaxRequestSize() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceExceptionTests that the rpc scheduler is called when requests arrive.- Throws:
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
testRpcServerForNotNullRemoteAddressInCallObject
public void testRpcServerForNotNullRemoteAddressInCallObject() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceExceptionTests that the RpcServer creates & dispatches CallRunner object to scheduler with non-null remoteAddress set to its Call Object- Throws:
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
testRemoteError
public void testRemoteError() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException- Throws:
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
testTimeout
- Throws:
IOException
-
createTestFailingRpcServer
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 - Throws:
IOException
-
testConnectionCloseWithOutstandingRPCs
Tests that the connection closing is handled by the client with outstanding RPC calls- Throws:
InterruptedException
IOException
-
testAsyncEcho
- Throws:
IOException
-
testAsyncRemoteError
- Throws:
IOException
-
testAsyncTimeout
- Throws:
IOException
-
waitSpan
private io.opentelemetry.sdk.trace.data.SpanData waitSpan(org.hamcrest.Matcher<io.opentelemetry.sdk.trace.data.SpanData> matcher) -
buildIpcSpanName
-
buildIpcClientSpanMatcher
private static org.hamcrest.Matcher<io.opentelemetry.sdk.trace.data.SpanData> buildIpcClientSpanMatcher(String packageAndService, String methodName) -
buildIpcServerSpanMatcher
private static org.hamcrest.Matcher<io.opentelemetry.sdk.trace.data.SpanData> buildIpcServerSpanMatcher(String packageAndService, String methodName) -
buildIpcClientSpanAttributesMatcher
private static org.hamcrest.Matcher<io.opentelemetry.sdk.trace.data.SpanData> buildIpcClientSpanAttributesMatcher(String packageAndService, String methodName, InetSocketAddress isa) -
buildIpcServerSpanAttributesMatcher
private static org.hamcrest.Matcher<io.opentelemetry.sdk.trace.data.SpanData> buildIpcServerSpanAttributesMatcher(String packageAndService, String methodName) -
assertRemoteSpan
-
testTracingSuccessIpc
public void testTracingSuccessIpc() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException- Throws:
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
testTracingErrorIpc
- Throws:
IOException
-
createBadAuthRpcClient
protected abstract org.apache.hadoop.hbase.ipc.AbstractRpcClient<?> createBadAuthRpcClient(org.apache.hadoop.conf.Configuration conf) -
doBadPreableHeaderCall
private IOException doBadPreableHeaderCall(org.apache.hadoop.hbase.shaded.ipc.protobuf.generated.TestRpcServiceProtos.TestProtobufRpcProto.BlockingInterface stub) -
testBadPreambleHeader
- Throws:
Exception
-
testGetConnectionRegistry
public void testGetConnectionRegistry() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceExceptionTestcase for getting connection registry information through connection preamble header, see HBASE-25051 for more details.- Throws:
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
testGetConnectionRegistryError
public void testGetConnectionRegistryError() throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceExceptionTest server does not support getting connection registry information through connection preamble header, i.e, a new client connecting to an old server. We simulate this by using a Server without implementing the ConnectionRegistryEndpoint interface.- Throws:
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-