Package org.apache.drill.exec.rpc.data
Class DataClient
java.lang.Object
org.apache.drill.exec.rpc.RpcBus<T,CC>
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.MessageLite
getResponseDefaultInstance
(int rpcType) protected void
handle
(DataClientConnection connection, int rpcType, ByteBuf pBody, ByteBuf dBody, ResponseSender sender) protected DataClientConnection
initRemoteConnection
(io.netty.channel.socket.SocketChannel channel) protected void
prepareSaslHandshake
(RpcConnectionHandler<DataClientConnection> connectionHandler, List<String> serverAuthMechanisms) 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:
getCloseHandler
in classRpcBus<BitData.RpcType,
DataClientConnection>
-
getResponseDefaultInstance
- Specified by:
getResponseDefaultInstance
in classRpcBus<BitData.RpcType,
DataClientConnection> - Throws:
RpcException
-
handle
protected void handle(DataClientConnection connection, int rpcType, ByteBuf pBody, ByteBuf dBody, ResponseSender sender) throws RpcException - Specified by:
handle
in classRpcBus<BitData.RpcType,
DataClientConnection> - Throws:
RpcException
-
prepareSaslHandshake
protected void prepareSaslHandshake(RpcConnectionHandler<DataClientConnection> connectionHandler, List<String> serverAuthMechanisms) -
validateHandshake
- Specified by:
validateHandshake
in classBasicClient<BitData.RpcType,
DataClientConnection, BitData.BitClientHandshake, BitData.BitServerHandshake> - Throws:
RpcException
-
getDecoder
- Specified by:
getDecoder
in classBasicClient<BitData.RpcType,
DataClientConnection, BitData.BitClientHandshake, BitData.BitServerHandshake>
-