Package org.apache.drill.exec.rpc.data
Class DataClient
java.lang.Object
org.apache.drill.exec.rpc.RpcBus<BitData.RpcType,DataClientConnection>
org.apache.drill.exec.rpc.BasicClient<BitData.RpcType,DataClientConnection,BitData.BitClientHandshake,BitData.BitServerHandshake>
org.apache.drill.exec.rpc.data.DataClient
- All Implemented Interfaces:
Closeable,AutoCloseable
public class DataClient
extends BasicClient<BitData.RpcType,DataClientConnection,BitData.BitClientHandshake,BitData.BitServerHandshake>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.rpc.RpcBus
RpcBus.ChannelClosedHandler, RpcBus.InboundHandler -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDataClient(CoordinationProtos.DrillbitEndpoint remoteEndpoint, org.apache.drill.exec.rpc.data.DataConnectionConfig config, ReconnectingConnection<DataClientConnection, BitData.BitClientHandshake>.CloseHandlerCreator closeHandlerFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected io.netty.util.concurrent.GenericFutureListener<io.netty.channel.ChannelFuture> getCloseHandler(io.netty.channel.socket.SocketChannel ch, DataClientConnection clientConnection) getDecoder(BufferAllocator allocator) com.google.protobuf.MessageLitegetResponseDefaultInstance(int rpcType) protected voidhandle(DataClientConnection connection, int rpcType, io.netty.buffer.ByteBuf pBody, io.netty.buffer.ByteBuf dBody, ResponseSender sender) protected DataClientConnectioninitRemoteConnection(io.netty.channel.socket.SocketChannel channel) protected voidprepareSaslHandshake(RpcConnectionHandler<DataClientConnection> connectionHandler, List<String> serverAuthMechanisms) Creates various instances needed to start the SASL handshake.validateHandshake(BitData.BitServerHandshake handshake) Methods inherited from class org.apache.drill.exec.rpc.BasicClient
close, connectAsClient, finalizeConnection, hasPing, isActive, isAuthComplete, isSslEnabled, send, send, send, setAuthComplete, setAutoRead, setSslChannel, setupSSL, startSaslHandshake
-
Constructor Details
-
DataClient
public DataClient(CoordinationProtos.DrillbitEndpoint remoteEndpoint, org.apache.drill.exec.rpc.data.DataConnectionConfig config, ReconnectingConnection<DataClientConnection, BitData.BitClientHandshake>.CloseHandlerCreator closeHandlerFactory)
-
-
Method Details
-
initRemoteConnection
-
getCloseHandler
protected io.netty.util.concurrent.GenericFutureListener<io.netty.channel.ChannelFuture> getCloseHandler(io.netty.channel.socket.SocketChannel ch, DataClientConnection clientConnection) - Overrides:
getCloseHandlerin classRpcBus<BitData.RpcType,DataClientConnection>
-
getResponseDefaultInstance
- Specified by:
getResponseDefaultInstancein classRpcBus<BitData.RpcType,DataClientConnection> - Throws:
RpcException
-
handle
protected void handle(DataClientConnection connection, int rpcType, io.netty.buffer.ByteBuf pBody, io.netty.buffer.ByteBuf dBody, ResponseSender sender) throws RpcException - Specified by:
handlein classRpcBus<BitData.RpcType,DataClientConnection> - Throws:
RpcException
-
prepareSaslHandshake
protected void prepareSaslHandshake(RpcConnectionHandler<DataClientConnection> connectionHandler, List<String> serverAuthMechanisms) Description copied from class:BasicClientCreates various instances needed to start the SASL handshake. This is called fromBasicClient.validateHandshake(MessageLite)if authentication is required from server side.- Specified by:
prepareSaslHandshakein classBasicClient<BitData.RpcType,DataClientConnection, BitData.BitClientHandshake, BitData.BitServerHandshake> - Parameters:
connectionHandler- - Connection handler used by client's to know about success/failure conditions.serverAuthMechanisms- - List of auth mechanisms configured on server side
-
validateHandshake
- Specified by:
validateHandshakein classBasicClient<BitData.RpcType,DataClientConnection, BitData.BitClientHandshake, BitData.BitServerHandshake> - Throws:
RpcException
-
getDecoder
- Specified by:
getDecoderin classBasicClient<BitData.RpcType,DataClientConnection, BitData.BitClientHandshake, BitData.BitServerHandshake>
-