@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 |
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() |
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) |
boolean |
isActive()
Tell the idle connection sweeper whether we could be swept.
|
private void |
saslNegotiate(org.apache.hbase.thirdparty.io.netty.channel.Channel ch) |
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() |
getConnectionHeader, getConnectionHeaderPreamble, getLastTouched, getRemoteInetAddress, remoteId, 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) throws IOException
IOException
private void scheduleRelogin(Throwable error)
private void failInit(org.apache.hbase.thirdparty.io.netty.channel.Channel ch, IOException e)
private void saslNegotiate(org.apache.hbase.thirdparty.io.netty.channel.Channel ch)
private void connect() 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.