@InterfaceAudience.LimitedPrivate(value="Configuration") public class NettyRpcServer extends RpcServer
RpcServer.BlockingServiceAndInterface, RpcServer.CallCleanup
Modifier and Type | Field and Description |
---|---|
(package private) org.apache.hbase.thirdparty.io.netty.channel.group.ChannelGroup |
allChannels |
private InetSocketAddress |
bindAddress |
private static int |
CHANNEL_WRITABLE_FATAL_WATERMARK_DEFAULT |
static String |
CHANNEL_WRITABLE_FATAL_WATERMARK_KEY
Fatal watermark for pending outbound bytes of a single netty channel.
|
private static int |
CHANNEL_WRITABLE_HIGH_WATERMARK_DEFAULT |
static String |
CHANNEL_WRITABLE_HIGH_WATERMARK_KEY
High watermark for pending outbound bytes of a single netty channel.
|
private static int |
CHANNEL_WRITABLE_LOW_WATERMARK_DEFAULT |
static String |
CHANNEL_WRITABLE_LOW_WATERMARK_KEY
Low watermark for pending outbound bytes of a single netty channel.
|
private org.apache.hbase.thirdparty.io.netty.buffer.ByteBufAllocator |
channelAllocator |
private CountDownLatch |
closed |
static String |
HBASE_NETTY_ALLOCATOR_KEY
Name of property to change the byte buf allocator for the netty channels.
|
(package private) static String |
HEAP_ALLOCATOR_TYPE |
private AtomicReference<FileChangeWatcher> |
keyStoreWatcher |
static org.slf4j.Logger |
LOG |
(package private) static String |
POOLED_ALLOCATOR_TYPE |
private org.apache.hbase.thirdparty.io.netty.channel.Channel |
serverChannel |
private AtomicReference<org.apache.hbase.thirdparty.io.netty.handler.ssl.SslContext> |
sslContextForServer |
private AtomicReference<FileChangeWatcher> |
trustStoreWatcher |
(package private) static String |
UNPOOLED_ALLOCATOR_TYPE |
private int |
writeBufferFatalThreshold |
private org.apache.hbase.thirdparty.io.netty.channel.WriteBufferWaterMark |
writeBufferWaterMark |
allowFallbackToSimpleAuth, AUDITLOG, AUTH_FAILED_FOR, AUTH_SUCCESSFUL_FOR, authManager, authTokenSecretMgr, bbAllocator, CALL_QUEUE_TOO_BIG_EXCEPTION, callQueueSizeInBytes, cellBlockBuilder, conf, CurCall, CURRENT_VERSION, DEFAULT_MAX_CALLQUEUE_LENGTH_PER_HANDLER, DEFAULT_MAX_CALLQUEUE_SIZE, DEFAULT_MAX_REQUEST_SIZE, DEFAULT_MIN_CLIENT_REQUEST_TIMEOUT, DEFAULT_TRACE_LOG_MAX_LENGTH, DEFAULT_WARN_RESPONSE_SIZE, DEFAULT_WARN_RESPONSE_TIME, errorHandler, FALLBACK_TO_INSECURE_CLIENT_AUTH, GSON, isSecurityEnabled, KEY_WORD_TRUNCATED, MAX_REQUEST_SIZE, maxQueueSizeInBytes, maxRequestSize, metrics, MIN_CLIENT_REQUEST_TIMEOUT, minClientRequestTimeout, MONITORED_RPC, NIO_BUFFER_LIMIT, running, saslProps, scheduler, secretManager, server, services, started, tcpKeepAlive, tcpNoDelay, TRACE_LOG_MAX_LENGTH, userProvider, WARN_RESPONSE_SIZE, WARN_RESPONSE_TIME, WARN_SCAN_RESPONSE_SIZE, WARN_SCAN_RESPONSE_TIME, warnResponseSize, warnResponseTime, warnScanResponseSize, warnScanResponseTime
Constructor and Description |
---|
NettyRpcServer(Server server,
String name,
List<RpcServer.BlockingServiceAndInterface> services,
InetSocketAddress bindAddress,
org.apache.hadoop.conf.Configuration conf,
RpcScheduler scheduler,
boolean reservoirEnabled) |
Modifier and Type | Method and Description |
---|---|
private void |
configureNettyWatermarks(org.apache.hadoop.conf.Configuration conf) |
protected NettyServerRpcConnection |
createNettyServerRpcConnection(org.apache.hbase.thirdparty.io.netty.channel.Channel channel) |
private org.apache.hbase.thirdparty.io.netty.buffer.ByteBufAllocator |
getChannelAllocator(org.apache.hadoop.conf.Configuration conf) |
InetSocketAddress |
getListenerAddress() |
int |
getNumOpenConnections()
The number of open RPC conections
|
(package private) org.apache.hbase.thirdparty.io.netty.handler.ssl.SslContext |
getSslContext() |
Pair<Long,Long> |
getTotalAndMaxNettyOutboundBytes() |
int |
getWriteBufferFatalThreshold() |
private void |
initSSL(org.apache.hbase.thirdparty.io.netty.channel.ChannelPipeline p,
boolean supportPlaintext) |
boolean |
isWritabilityBackpressureEnabled() |
void |
join() |
void |
onConfigurationChange(org.apache.hadoop.conf.Configuration newConf)
This method would be called by the
ConfigurationManager object when the
Configuration object is reloaded from disk. |
void |
setSocketSendBufSize(int size) |
void |
start() |
void |
stop() |
addCallSize, authorize, call, channelRead, createSecretManager, getByteBuffAllocator, getConf, getCurrentCall, getCurrentServerCallWithCellScanner, getErrorHandler, getMetrics, getRemoteAddress, getRemoteIp, getRequestUser, getRequestUserName, getScheduler, getSecretManager, getService, getServiceAndInterface, getServiceInterface, getStatus, initReconfigurable, isInRpcCallContext, isStarted, logResponse, needAuthorization, refreshAuthManager, setCurrentCall, setErrorHandler, setNamedQueueRecorder, setRsRpcServices, setSecretManager, truncateTraceLog, unsetCurrentCall
public static final org.slf4j.Logger LOG
public static final String HBASE_NETTY_ALLOCATOR_KEY
"pooled" and "unpooled" may prefer direct memory depending on netty configuration, which is controlled by platform specific code and documented system properties.
"heap" will prefer heap arena allocations.
static final String POOLED_ALLOCATOR_TYPE
static final String UNPOOLED_ALLOCATOR_TYPE
static final String HEAP_ALLOCATOR_TYPE
public static final String CHANNEL_WRITABLE_LOW_WATERMARK_KEY
private static final int CHANNEL_WRITABLE_LOW_WATERMARK_DEFAULT
public static final String CHANNEL_WRITABLE_HIGH_WATERMARK_KEY
Note: any requests already in the call queue will still be processed.
private static final int CHANNEL_WRITABLE_HIGH_WATERMARK_DEFAULT
public static final String CHANNEL_WRITABLE_FATAL_WATERMARK_KEY
Note: must be higher than the high watermark, otherwise it's ignored.
private static final int CHANNEL_WRITABLE_FATAL_WATERMARK_DEFAULT
private final InetSocketAddress bindAddress
private final CountDownLatch closed
private final org.apache.hbase.thirdparty.io.netty.channel.Channel serverChannel
final org.apache.hbase.thirdparty.io.netty.channel.group.ChannelGroup allChannels
private final org.apache.hbase.thirdparty.io.netty.buffer.ByteBufAllocator channelAllocator
private final AtomicReference<org.apache.hbase.thirdparty.io.netty.handler.ssl.SslContext> sslContextForServer
private final AtomicReference<FileChangeWatcher> keyStoreWatcher
private final AtomicReference<FileChangeWatcher> trustStoreWatcher
private volatile int writeBufferFatalThreshold
private volatile org.apache.hbase.thirdparty.io.netty.channel.WriteBufferWaterMark writeBufferWaterMark
public NettyRpcServer(Server server, String name, List<RpcServer.BlockingServiceAndInterface> services, InetSocketAddress bindAddress, org.apache.hadoop.conf.Configuration conf, RpcScheduler scheduler, boolean reservoirEnabled) throws IOException
IOException
public void onConfigurationChange(org.apache.hadoop.conf.Configuration newConf)
ConfigurationObserver
ConfigurationManager
object when the
Configuration
object is reloaded from disk.onConfigurationChange
in interface ConfigurationObserver
onConfigurationChange
in class RpcServer
private void configureNettyWatermarks(org.apache.hadoop.conf.Configuration conf)
public boolean isWritabilityBackpressureEnabled()
private org.apache.hbase.thirdparty.io.netty.buffer.ByteBufAllocator getChannelAllocator(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
@InterfaceAudience.Private protected NettyServerRpcConnection createNettyServerRpcConnection(org.apache.hbase.thirdparty.io.netty.channel.Channel channel)
public void start()
public void stop()
public void join() throws InterruptedException
InterruptedException
public InetSocketAddress getListenerAddress()
public void setSocketSendBufSize(int size)
public int getNumOpenConnections()
RpcServer
getNumOpenConnections
in class RpcServer
private void initSSL(org.apache.hbase.thirdparty.io.netty.channel.ChannelPipeline p, boolean supportPlaintext) throws X509Exception, IOException
X509Exception
IOException
org.apache.hbase.thirdparty.io.netty.handler.ssl.SslContext getSslContext() throws X509Exception, IOException
X509Exception
IOException
public int getWriteBufferFatalThreshold()
public Pair<Long,Long> getTotalAndMaxNettyOutboundBytes()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.