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
Nested ClassesModifier and TypeClassDescriptionprivate static classprotected static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected InetAddressprotected booleanprotected RpcServer.CallCleanupprotected X509Certificate[]protected CodecCodec the client asked use.protected org.apache.hadoop.io.compress.CompressionCodecCompression codec the client asked us use.protected org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeaderprotected booleanprivate static final io.opentelemetry.context.propagation.TextMapGetter<org.apache.hadoop.hbase.shaded.protobuf.generated.TracingProtos.RPCTInfo>protected Stringprotected SaslServerAuthenticationProviderprotected intprotected booleanprotected final RpcServerprotected SaslServerAuthenticationProvidersprotected HBaseSaslRpcServerprotected org.apache.hbase.thirdparty.com.google.protobuf.BlockingServiceprotected booleanprotected org.apache.hadoop.security.UserGroupInformationprotected Userprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanprotected final voidabstract 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, CellScanner cellScanner, long size, InetAddress remoteAddress, int timeout, RpcServer.CallCleanup reqCleanup) private org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStreamprivate org.apache.hadoop.security.UserGroupInformationcreateUser(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeader head) protected final voidprivate voidprivate voiddoBadPreambleHandling(String msg, Exception e) private booleanprivate voiddoPreambleResponse(org.apache.hbase.thirdparty.com.google.protobuf.Message resp) protected final voiddoRawSaslReply(SaslStatus status, org.apache.hadoop.io.Writable rv, String errorClass, String error) No protobuf encoding of raw sasl messagesprotected abstract voiddoRespond(RpcResponse resp) private void(package private) voidprivate org.apache.hbase.thirdparty.com.google.protobuf.ByteStringgetByteString(byte[] bytes) protected final RpcResponsegetErrorResponse(String msg, Exception e) private StringgetFatalConnectionString(int version, byte authByte) (package private) HBaseSaslRpcServerintorg.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.VersionInfoabstract boolean(package private) booleanprivate voidvoidprocessOneRpc(ByteBuff buf) protected final ServerRpcConnection.PreambleResponseprocessPreamble(ByteBuffer preambleBuffer) protected voidprocessRequest(ByteBuff buf) Has the request header and the request param and optionally encoded data buffer all in this one array.private voidSend the response for connection headerprivate voidsendErrorResponseForCall(int id, long totalRequestSize, io.opentelemetry.api.trace.Span span, String msg, Throwable responseThrowable) private voidSet 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:
IOExceptionInterruptedException
-
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:
IOExceptionInterruptedException
-
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, CellScanner cellScanner, long size, InetAddress remoteAddress, int timeout, RpcServer.CallCleanup reqCleanup)
-