public class UserClient extends BasicClient<UserProtos.RpcType,UserClient.UserToBitConnection,UserProtos.UserToBitHandshake,UserProtos.BitToUserHandshake>
| Modifier and Type | Class and Description |
|---|---|
class |
UserClient.UserToBitConnection |
RpcBus.ChannelClosedHandler, RpcBus.InboundHandlerconnection| Constructor and Description |
|---|
UserClient(String clientName,
DrillConfig config,
Properties properties,
boolean supportComplexTypes,
BufferAllocator allocator,
io.netty.channel.EventLoopGroup eventLoopGroup,
Executor eventExecutor,
CoordinationProtos.DrillbitEndpoint endpoint) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(CoordinationProtos.DrillbitEndpoint endpoint,
DrillProperties properties,
UserBitShared.UserCredentials credentials)
Connects, and if required, authenticates.
|
ProtobufLengthDecoder |
getDecoder(BufferAllocator allocator) |
protected com.google.protobuf.MessageLite |
getResponseDefaultInstance(int rpcType) |
UserProtos.RpcEndpointInfos |
getServerInfos() |
Set<UserProtos.RpcType> |
getSupportedMethods() |
protected void |
handle(UserClient.UserToBitConnection connection,
int rpcType,
ByteBuf pBody,
ByteBuf dBody,
ResponseSender sender) |
protected UserClient.UserToBitConnection |
initRemoteConnection(io.netty.channel.socket.SocketChannel channel) |
protected boolean |
isSslEnabled() |
DrillRpcFuture<UserProtos.QueryPlanFragments> |
planQuery(UserProtos.GetQueryPlanFragments req)
planQuery is an API to plan a query without query execution
|
protected <SEND extends com.google.protobuf.MessageLite,RECEIVE extends com.google.protobuf.MessageLite> |
send(RpcOutcomeListener<RECEIVE> listener,
UserProtos.RpcType rpcType,
SEND protobufBody,
Class<RECEIVE> clazz,
boolean allowInEventLoop,
ByteBuf... dataBodies) |
protected void |
setupSSL(io.netty.channel.ChannelPipeline pipe,
ConnectionMultiListener.SSLHandshakeListener sslHandshakeListener) |
void |
submitQuery(UserResultsListener resultsListener,
UserProtos.RunQuery query) |
protected void |
validateHandshake(UserProtos.BitToUserHandshake inbound) |
close, connectAsClient, finalizeConnection, getInitialCommand, isActive, send, send, send, setAutoRead, setSslChannelget, getCloseHandler, send, send, send, setAddressespublic UserClient(String clientName, DrillConfig config, Properties properties, boolean supportComplexTypes, BufferAllocator allocator, io.netty.channel.EventLoopGroup eventLoopGroup, Executor eventExecutor, CoordinationProtos.DrillbitEndpoint endpoint) throws NonTransientRpcException
NonTransientRpcExceptionprotected void setupSSL(io.netty.channel.ChannelPipeline pipe,
ConnectionMultiListener.SSLHandshakeListener sslHandshakeListener)
protected boolean isSslEnabled()
public UserProtos.RpcEndpointInfos getServerInfos()
public Set<UserProtos.RpcType> getSupportedMethods()
public void submitQuery(UserResultsListener resultsListener, UserProtos.RunQuery query)
public void connect(CoordinationProtos.DrillbitEndpoint endpoint, DrillProperties properties, UserBitShared.UserCredentials credentials) throws RpcException
endpoint - endpoint to connect toproperties - propertiescredentials - credentialsRpcException - if either connection or authentication failsprotected <SEND extends com.google.protobuf.MessageLite,RECEIVE extends com.google.protobuf.MessageLite> void send(RpcOutcomeListener<RECEIVE> listener, UserProtos.RpcType rpcType, SEND protobufBody, Class<RECEIVE> clazz, boolean allowInEventLoop, ByteBuf... dataBodies)
protected com.google.protobuf.MessageLite getResponseDefaultInstance(int rpcType)
throws RpcException
getResponseDefaultInstance in class RpcBus<UserProtos.RpcType,UserClient.UserToBitConnection>RpcExceptionprotected void handle(UserClient.UserToBitConnection connection, int rpcType, ByteBuf pBody, ByteBuf dBody, ResponseSender sender) throws RpcException
handle in class RpcBus<UserProtos.RpcType,UserClient.UserToBitConnection>RpcExceptionprotected void validateHandshake(UserProtos.BitToUserHandshake inbound) throws RpcException
validateHandshake in class BasicClient<UserProtos.RpcType,UserClient.UserToBitConnection,UserProtos.UserToBitHandshake,UserProtos.BitToUserHandshake>RpcExceptionprotected UserClient.UserToBitConnection initRemoteConnection(io.netty.channel.socket.SocketChannel channel)
public ProtobufLengthDecoder getDecoder(BufferAllocator allocator)
public DrillRpcFuture<UserProtos.QueryPlanFragments> planQuery(UserProtos.GetQueryPlanFragments req)
req - - data necessary to plan queryCopyright © 2017 The Apache Software Foundation. All rights reserved.