Package org.apache.hadoop.hbase.ipc
Class ServerRpcConnection
java.lang.Object
org.apache.hadoop.hbase.ipc.ServerRpcConnection
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
NettyServerRpcConnection
,SimpleServerRpcConnection
Reads calls from a connection and queues them for handling.
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
protected static enum
-
Field Summary
Modifier and TypeFieldDescriptionprotected InetAddress
protected boolean
protected RpcServer.CallCleanup
protected X509Certificate[]
protected Codec
Codec the client asked use.protected org.apache.hadoop.io.compress.CompressionCodec
Compression codec the client asked us use.protected org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeader
protected boolean
private static final io.opentelemetry.context.propagation.TextMapGetter<org.apache.hadoop.hbase.shaded.protobuf.generated.TracingProtos.RPCTInfo>
protected String
protected SaslServerAuthenticationProvider
protected int
protected boolean
protected final RpcServer
protected SaslServerAuthenticationProviders
protected HBaseSaslRpcServer
protected org.apache.hbase.thirdparty.com.google.protobuf.BlockingService
protected boolean
protected org.apache.hadoop.security.UserGroupInformation
protected User
protected boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
protected final void
abstract ServerCall<?>
createCall
(int id, org.apache.hbase.thirdparty.com.google.protobuf.BlockingService service, org.apache.hbase.thirdparty.com.google.protobuf.Descriptors.MethodDescriptor md, org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param, ExtendedCellScanner cellScanner, long size, InetAddress remoteAddress, int timeout, RpcServer.CallCleanup reqCleanup) private org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream
private org.apache.hadoop.security.UserGroupInformation
createUser
(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeader head) protected final void
private void
private void
doBadPreambleHandling
(String msg, Exception e) private boolean
private void
doPreambleResponse
(org.apache.hbase.thirdparty.com.google.protobuf.Message resp) protected final void
doRawSaslReply
(SaslStatus status, org.apache.hadoop.io.Writable rv, String errorClass, String error) No protobuf encoding of raw sasl messagesprotected abstract void
doRespond
(RpcResponse resp) private void
(package private) void
private org.apache.hbase.thirdparty.com.google.protobuf.ByteString
getByteString
(byte[] bytes) protected final RpcResponse
getErrorResponse
(String msg, Exception e) private String
getFatalConnectionString
(int version, byte authByte) (package private) HBaseSaslRpcServer
int
org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.VersionInfo
abstract boolean
(package private) boolean
private void
void
processOneRpc
(ByteBuff buf) protected final ServerRpcConnection.PreambleResponse
processPreamble
(ByteBuffer preambleBuffer) protected void
processRequest
(ByteBuff buf) Has the request header and the request param and optionally encoded data buffer all in this one array.private void
Send the response for connection headerprivate void
sendErrorResponseForCall
(int id, long totalRequestSize, io.opentelemetry.api.trace.Span span, String msg, Throwable responseThrowable) private void
Set up cell block codecsprivate Pair<org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeaderResponse,
CryptoAES> Set up cipher for rpc encryption with Apache Commons Crypto.toString()
-
Field Details
-
getter
private static final io.opentelemetry.context.propagation.TextMapGetter<org.apache.hadoop.hbase.shaded.protobuf.generated.TracingProtos.RPCTInfo> getter -
rpcServer
-
connectionHeaderRead
-
callCleanup
-
hostAddress
-
remotePort
-
addr
-
connectionHeader
protected org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeader connectionHeader -
connectionAttributes
-
codec
Codec the client asked use. -
compressionCodec
Compression codec the client asked us use. -
service
-
provider
-
skipInitialSaslHandshake
-
useSasl
-
saslServer
-
authenticatedWithFallback
-
retryImmediatelySupported
-
user
-
ugi
-
saslProviders
-
clientCertificateChain
-
-
Constructor Details
-
ServerRpcConnection
-
-
Method Details
-
toString
-
getHostAddress
-
getHostInetAddress
-
getRemotePort
-
getVersionInfo
-
getFatalConnectionString
-
setupCellBlockCodecs
Set up cell block codecs- Throws:
FatalConnectionException
-
setupCryptoCipher
private Pair<org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeaderResponse,CryptoAES> setupCryptoCipher() throws FatalConnectionExceptionSet up cipher for rpc encryption with Apache Commons Crypto.- Throws:
FatalConnectionException
-
getByteString
-
createUser
private org.apache.hadoop.security.UserGroupInformation createUser(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeader head) -
disposeSasl
-
doRawSaslReply
protected final void doRawSaslReply(SaslStatus status, org.apache.hadoop.io.Writable rv, String errorClass, String error) throws IOException No protobuf encoding of raw sasl messages- Throws:
IOException
-
getOrCreateSaslServer
- Throws:
IOException
-
finishSaslNegotiation
- Throws:
IOException
-
processOneRpc
- Throws:
IOException
InterruptedException
-
authorizeConnection
- Throws:
IOException
-
createCis
-
processConnectionHeader
- Throws:
IOException
-
sendConnectionHeaderResponseIfNeeded
Send the response for connection header- Throws:
FatalConnectionException
-
doRespond
- Throws:
IOException
-
processRequest
Has the request header and the request param and optionally encoded data buffer all in this one array. Will be overridden in tests.- Throws:
IOException
InterruptedException
-
sendErrorResponseForCall
private void sendErrorResponseForCall(int id, long totalRequestSize, io.opentelemetry.api.trace.Span span, String msg, Throwable responseThrowable) throws IOException - Throws:
IOException
-
getErrorResponse
- Throws:
IOException
-
doBadPreambleHandling
- Throws:
IOException
-
doBadPreambleHandling
- Throws:
IOException
-
doPreambleResponse
private void doPreambleResponse(org.apache.hbase.thirdparty.com.google.protobuf.Message resp) throws IOException - Throws:
IOException
-
doConnectionRegistryResponse
- Throws:
IOException
-
doSecurityPreambleResponse
- Throws:
IOException
-
callCleanupIfNeeded
-
processPreamble
protected final ServerRpcConnection.PreambleResponse processPreamble(ByteBuffer preambleBuffer) throws IOException - Throws:
IOException
-
isSimpleAuthentication
boolean isSimpleAuthentication() -
isConnectionOpen
-
createCall
public abstract ServerCall<?> createCall(int id, org.apache.hbase.thirdparty.com.google.protobuf.BlockingService service, org.apache.hbase.thirdparty.com.google.protobuf.Descriptors.MethodDescriptor md, org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param, ExtendedCellScanner cellScanner, long size, InetAddress remoteAddress, int timeout, RpcServer.CallCleanup reqCleanup)
-