@InterfaceAudience.Private class NettyRpcConnection extends RpcConnection
Most operations are executed in handlers. Netty handler is always executed in the same thread(EventLoop) so no lock is needed.
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 static org.slf4j.Logger |
LOG |
private static ScheduledExecutorService |
RELOGIN_EXECUTOR |
private boolean |
reloginInProgress |
private NettyRpcClient |
rpcClient |
authMethod, codec, compressor, conf, CRYPTO_AES_ENABLED_DEFAULT, CRYPTO_AES_ENABLED_KEY, lastTouched, reloginMaxBackoff, remoteId, serverPrincipal, 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) |
void |
shutdown()
Just close connection.
|
private void |
shutdown0() |
private void |
write(org.apache.hbase.thirdparty.io.netty.channel.Channel ch,
Call call) |
getConnectionHeader, getConnectionHeaderPreamble, getLastTouched, getUGI, relogin, remoteId, scheduleTimeoutTask, setLastTouched, shouldAuthenticateOverKrb
private static final org.slf4j.Logger LOG
private static final ScheduledExecutorService RELOGIN_EXECUTOR
private final NettyRpcClient rpcClient
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.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()
public void sendRequest(Call call, HBaseRpcController hrc) throws IOException
sendRequest
in class RpcConnection
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.