@InterfaceAudience.Private abstract class ServerRpcConnection extends Object implements Closeable
Modifier and Type | Class and Description |
---|---|
private static class |
ServerRpcConnection.ByteBuffByteInput |
Modifier and Type | Field and Description |
---|---|
protected InetAddress |
addr |
protected boolean |
authenticatedWithFallback |
protected AuthMethod |
authMethod |
protected RpcServer.CallCleanup |
callCleanup |
protected Codec |
codec
Codec the client asked use.
|
protected org.apache.hadoop.io.compress.CompressionCodec |
compressionCodec
Compression codec the client asked us use.
|
protected org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeader |
connectionHeader |
protected boolean |
connectionHeaderRead |
protected CryptoAES |
cryptoAES |
protected String |
hostAddress |
protected int |
remotePort |
protected boolean |
retryImmediatelySupported |
protected RpcServer |
rpcServer |
protected boolean |
saslContextEstablished |
protected HBaseSaslRpcServer |
saslServer |
protected org.apache.hbase.thirdparty.com.google.protobuf.BlockingService |
service |
protected boolean |
skipInitialSaslHandshake |
protected org.apache.hadoop.security.UserGroupInformation |
ugi |
private ByteBuffer |
unwrappedData |
private ByteBuffer |
unwrappedDataLengthBuffer |
protected boolean |
useCryptoAesWrap |
protected User |
user |
protected boolean |
useSasl |
protected boolean |
useWrap |
Constructor and Description |
---|
ServerRpcConnection(RpcServer rpcServer) |
Modifier and Type | Method and Description |
---|---|
private boolean |
authorizeConnection() |
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) |
private org.apache.hadoop.security.UserGroupInformation |
createUser(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeader head) |
protected void |
disposeSasl() |
private void |
doBadPreambleHandling(String msg) |
private void |
doBadPreambleHandling(String msg,
Exception e) |
protected void |
doRawSaslReply(SaslStatus status,
org.apache.hadoop.io.Writable rv,
String errorClass,
String error)
No protobuf encoding of raw sasl messages
|
protected abstract void |
doRespond(RpcResponse resp) |
private org.apache.hadoop.security.UserGroupInformation |
getAuthorizedUgi(String authorizedId) |
private org.apache.hbase.thirdparty.com.google.protobuf.ByteString |
getByteString(byte[] bytes) |
protected RpcResponse |
getErrorResponse(String msg,
Exception e) |
private String |
getFatalConnectionString(int version,
byte authByte) |
String |
getHostAddress() |
InetAddress |
getHostInetAddress() |
int |
getRemotePort() |
org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.VersionInfo |
getVersionInfo() |
abstract boolean |
isConnectionOpen() |
private void |
processConnectionHeader(ByteBuff buf) |
void |
processOneRpc(ByteBuff buf) |
protected boolean |
processPreamble(ByteBuffer preambleBuffer) |
protected void |
processRequest(ByteBuff buf) |
private void |
processUnwrappedData(byte[] inBuf) |
private void |
responseConnectionHeader(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeaderResponse.Builder chrBuilder)
Send the response for connection header
|
void |
saslReadAndProcess(ByteBuff saslToken) |
private void |
setupCellBlockCodecs(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeader header)
Set up cell block codecs
|
private void |
setupCryptoCipher(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeader header,
org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeaderResponse.Builder chrBuilder)
Set up cipher for rpc encryption with Apache Commons Crypto
|
String |
toString() |
protected boolean connectionHeaderRead
protected RpcServer.CallCleanup callCleanup
protected String hostAddress
protected int remotePort
protected InetAddress addr
protected org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeader connectionHeader
protected org.apache.hadoop.io.compress.CompressionCodec compressionCodec
protected org.apache.hbase.thirdparty.com.google.protobuf.BlockingService service
protected AuthMethod authMethod
protected boolean saslContextEstablished
protected boolean skipInitialSaslHandshake
private ByteBuffer unwrappedData
private ByteBuffer unwrappedDataLengthBuffer
protected boolean useSasl
protected HBaseSaslRpcServer saslServer
protected boolean useWrap
protected boolean useCryptoAesWrap
protected boolean authenticatedWithFallback
protected boolean retryImmediatelySupported
protected org.apache.hadoop.security.UserGroupInformation ugi
public ServerRpcConnection(RpcServer rpcServer)
public String getHostAddress()
public InetAddress getHostInetAddress()
public int getRemotePort()
public org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.VersionInfo getVersionInfo()
private String getFatalConnectionString(int version, byte authByte)
private org.apache.hadoop.security.UserGroupInformation getAuthorizedUgi(String authorizedId) throws IOException
IOException
private void setupCellBlockCodecs(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeader header) throws FatalConnectionException
FatalConnectionException
private void setupCryptoCipher(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeader header, org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeaderResponse.Builder chrBuilder) throws FatalConnectionException
FatalConnectionException
private org.apache.hbase.thirdparty.com.google.protobuf.ByteString getByteString(byte[] bytes)
private org.apache.hadoop.security.UserGroupInformation createUser(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeader head)
protected final void disposeSasl()
protected final void doRawSaslReply(SaslStatus status, org.apache.hadoop.io.Writable rv, String errorClass, String error) throws IOException
IOException
public void saslReadAndProcess(ByteBuff saslToken) throws IOException, InterruptedException
IOException
InterruptedException
private void processUnwrappedData(byte[] inBuf) throws IOException, InterruptedException
IOException
InterruptedException
public void processOneRpc(ByteBuff buf) throws IOException, InterruptedException
IOException
InterruptedException
private boolean authorizeConnection() throws IOException
IOException
private void processConnectionHeader(ByteBuff buf) throws IOException
IOException
private void responseConnectionHeader(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeaderResponse.Builder chrBuilder) throws FatalConnectionException
FatalConnectionException
protected abstract void doRespond(RpcResponse resp) throws IOException
IOException
protected void processRequest(ByteBuff buf) throws IOException, InterruptedException
buf
- Has the request header and the request param and optionally
encoded data buffer all in this one array.IOException
InterruptedException
protected final RpcResponse getErrorResponse(String msg, Exception e) throws IOException
IOException
private void doBadPreambleHandling(String msg) throws IOException
IOException
private void doBadPreambleHandling(String msg, Exception e) throws IOException
IOException
protected final boolean processPreamble(ByteBuffer preambleBuffer) throws IOException
IOException
public abstract boolean isConnectionOpen()
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)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.