Package org.apache.drill.exec.rpc.user
Class UserServer
java.lang.Object
org.apache.drill.exec.rpc.RpcBus<T,SC>
org.apache.drill.exec.rpc.BasicServer<UserProtos.RpcType,UserServer.BitToUserConnection>
org.apache.drill.exec.rpc.user.UserServer
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Represents a client connection accepted by Foreman Drillbit's UserServer from a DrillClient.class
User Connection's config for System Table accessNested classes/interfaces inherited from class org.apache.drill.exec.rpc.BasicServer
BasicServer.ServerHandshakeHandler<T extends com.google.protobuf.MessageLite>
Nested classes/interfaces inherited from class org.apache.drill.exec.rpc.RpcBus
RpcBus.ChannelClosedHandler, RpcBus.InboundHandler
-
Field Summary
-
Constructor Summary
ConstructorDescriptionUserServer
(BootStrapContext context, BufferAllocator allocator, io.netty.channel.EventLoopGroup eventLoopGroup, UserWorker worker) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
closeSSL()
protected ProtobufLengthDecoder
getDecoder
(BufferAllocator allocator, OutOfMemoryHandler outOfMemoryHandler) getHandshakeHandler
(UserServer.BitToUserConnection connection) protected com.google.protobuf.MessageLite
getResponseDefaultInstance
(int rpcType) Access to set of active connection details for this instance of the Drillbitprotected UserServer.BitToUserConnection
initRemoteConnection
(io.netty.channel.socket.SocketChannel channel) protected boolean
void
setSslChannel
(io.netty.channel.Channel c) protected void
setupSSL
(io.netty.channel.ChannelPipeline pipe) Methods inherited from class org.apache.drill.exec.rpc.BasicServer
bind, close, getOutOfMemoryHandler, handle
Methods inherited from class org.apache.drill.exec.rpc.RpcBus
get, getCloseHandler, send, send, send, setAddresses
-
Constructor Details
-
UserServer
public UserServer(BootStrapContext context, BufferAllocator allocator, io.netty.channel.EventLoopGroup eventLoopGroup, UserWorker worker) throws DrillbitStartupException - Throws:
DrillbitStartupException
-
-
Method Details
-
setupSSL
protected void setupSSL(io.netty.channel.ChannelPipeline pipe) - Overrides:
setupSSL
in classBasicServer<UserProtos.RpcType,
UserServer.BitToUserConnection>
-
isSslEnabled
protected boolean isSslEnabled()- Overrides:
isSslEnabled
in classBasicServer<UserProtos.RpcType,
UserServer.BitToUserConnection>
-
setSslChannel
public void setSslChannel(io.netty.channel.Channel c) - Overrides:
setSslChannel
in classBasicServer<UserProtos.RpcType,
UserServer.BitToUserConnection>
-
closeSSL
protected void closeSSL()- Overrides:
closeSSL
in classBasicServer<UserProtos.RpcType,
UserServer.BitToUserConnection>
-
getResponseDefaultInstance
protected com.google.protobuf.MessageLite getResponseDefaultInstance(int rpcType) throws RpcException - Specified by:
getResponseDefaultInstance
in classBasicServer<UserProtos.RpcType,
UserServer.BitToUserConnection> - Throws:
RpcException
-
getUserConnections
public static Set<Map.Entry<UserServer.BitToUserConnection,UserServer.BitToUserConnectionConfig>> getUserConnections()Access to set of active connection details for this instance of the Drillbit- Returns:
- Active connection set
-
initRemoteConnection
protected UserServer.BitToUserConnection initRemoteConnection(io.netty.channel.socket.SocketChannel channel) - Overrides:
initRemoteConnection
in classBasicServer<UserProtos.RpcType,
UserServer.BitToUserConnection>
-
getHandshakeHandler
protected BasicServer.ServerHandshakeHandler<UserProtos.UserToBitHandshake> getHandshakeHandler(UserServer.BitToUserConnection connection) - Specified by:
getHandshakeHandler
in classBasicServer<UserProtos.RpcType,
UserServer.BitToUserConnection>
-
getDecoder
protected ProtobufLengthDecoder getDecoder(BufferAllocator allocator, OutOfMemoryHandler outOfMemoryHandler) - Specified by:
getDecoder
in classBasicServer<UserProtos.RpcType,
UserServer.BitToUserConnection>
-