@InterfaceAudience.Private class NettyRpcConnection extends RpcConnection
eventLoop
thread, otherwise there will be races.Modifier and Type | Field and Description |
---|---|
private org.apache.hbase.thirdparty.io.netty.channel.Channel |
channel |
private org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf |
connectionHeaderPreamble |
private org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf |
connectionHeaderWithLength |
private org.apache.hbase.thirdparty.io.netty.channel.EventLoop |
eventLoop |
private static org.slf4j.Logger |
LOG |
private static ScheduledExecutorService |
RELOGIN_EXECUTOR |
private boolean |
reloginInProgress |
private NettyRpcClient |
rpcClient |
cellBlockBuilder, codec, compressor, conf, CRYPTO_AES_ENABLED_DEFAULT, CRYPTO_AES_ENABLED_KEY, lastTouched, metrics, provider, reloginMaxBackoff, remoteId, securityInfo, timeoutTimer, token, useSasl
Constructor and Description |
---|
NettyRpcConnection(NettyRpcClient rpcClient,
ConnectionId remoteId) |
Modifier and Type | Method and Description |
---|---|
protected void |
callTimeout(Call call) |
void |
cleanupConnection()
Does the clean up work after the connection is removed from the connection pool
|
private void |
connect(Call connectionRegistryCall) |
private void |
established(org.apache.hbase.thirdparty.io.netty.channel.Channel ch) |
private void |
failInit(org.apache.hbase.thirdparty.io.netty.channel.Channel ch,
IOException e) |
private void |
getConnectionRegistry(org.apache.hbase.thirdparty.io.netty.channel.Channel ch,
Call connectionRegistryCall) |
boolean |
isActive()
Tell the idle connection sweeper whether we could be swept.
|
private void |
onSecurityPreambleError(org.apache.hbase.thirdparty.io.netty.channel.Channel ch,
Set<String> serverPrincipals,
IOException error) |
private void |
onSecurityPreambleFinish(org.apache.hbase.thirdparty.io.netty.channel.Channel ch,
Set<String> serverPrincipals,
Call securityPreambleCall) |
private void |
saslEstablished(org.apache.hbase.thirdparty.io.netty.channel.Channel ch,
String serverPrincipal) |
private void |
saslFailInit(org.apache.hbase.thirdparty.io.netty.channel.Channel ch,
String serverPrincipal,
IOException error) |
private void |
saslNegotiate(org.apache.hbase.thirdparty.io.netty.channel.Channel ch) |
private void |
saslNegotiate(org.apache.hbase.thirdparty.io.netty.channel.Channel ch,
String serverPrincipal) |
private void |
scheduleRelogin(Throwable error) |
void |
sendRequest(Call call,
HBaseRpcController hrc) |
private void |
sendRequest0(Call call,
HBaseRpcController hrc) |
void |
shutdown()
Just close connection.
|
private void |
shutdown0() |
chooseServerPrincipal, createSecurityPreambleCall, getConnectionHeader, getConnectionHeaderPreamble, getLastTouched, getRemoteInetAddress, getServerPrincipals, isKerberosAuth, randomSelect, readResponse, remoteId, saslNegotiationDone, scheduleTimeoutTask, setLastTouched
private static final org.slf4j.Logger LOG
private static final ScheduledExecutorService RELOGIN_EXECUTOR
private final NettyRpcClient rpcClient
private final org.apache.hbase.thirdparty.io.netty.channel.EventLoop eventLoop
private org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf connectionHeaderPreamble
private org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf connectionHeaderWithLength
private volatile org.apache.hbase.thirdparty.io.netty.channel.Channel channel
private boolean reloginInProgress
NettyRpcConnection(NettyRpcClient rpcClient, ConnectionId remoteId) throws IOException
IOException
protected void callTimeout(Call call)
callTimeout
in class RpcConnection
public boolean isActive()
RpcConnection
isActive
in class RpcConnection
private void shutdown0()
public void shutdown()
RpcConnection
shutdown
in class RpcConnection
public void cleanupConnection()
RpcConnection
cleanupConnection
in class RpcConnection
private void established(org.apache.hbase.thirdparty.io.netty.channel.Channel ch)
private void saslEstablished(org.apache.hbase.thirdparty.io.netty.channel.Channel ch, String serverPrincipal)
private void scheduleRelogin(Throwable error)
private void failInit(org.apache.hbase.thirdparty.io.netty.channel.Channel ch, IOException e)
private void saslFailInit(org.apache.hbase.thirdparty.io.netty.channel.Channel ch, String serverPrincipal, IOException error)
private void saslNegotiate(org.apache.hbase.thirdparty.io.netty.channel.Channel ch, String serverPrincipal)
private void getConnectionRegistry(org.apache.hbase.thirdparty.io.netty.channel.Channel ch, Call connectionRegistryCall)
private void onSecurityPreambleError(org.apache.hbase.thirdparty.io.netty.channel.Channel ch, Set<String> serverPrincipals, IOException error)
private void onSecurityPreambleFinish(org.apache.hbase.thirdparty.io.netty.channel.Channel ch, Set<String> serverPrincipals, Call securityPreambleCall)
private void saslNegotiate(org.apache.hbase.thirdparty.io.netty.channel.Channel ch) throws IOException
IOException
private void connect(Call connectionRegistryCall) throws UnknownHostException
UnknownHostException
private void sendRequest0(Call call, HBaseRpcController hrc) throws IOException
IOException
public void sendRequest(Call call, HBaseRpcController hrc)
sendRequest
in class RpcConnection
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.