Package org.apache.drill.exec.work.batch
Class ControlMessageHandler
java.lang.Object
org.apache.drill.exec.work.batch.ControlMessageHandler
- All Implemented Interfaces:
RequestHandler<ControlConnection>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handle
(ControlConnection connection, int rpcType, io.netty.buffer.ByteBuf pBody, io.netty.buffer.ByteBuf dBody, ResponseSender sender) Handle request of given type (rpcType) with message (pBody) and optional data (dBody) on the connection, and return the appropriate response.initializeFragment
(BitControl.InitializeFragments fragments) receivingFragmentFinished
(BitControl.FinishedReceiver finishedReceiver) requestQueryCancel
(UserBitShared.QueryId queryId) requestQueryStatus
(UserBitShared.QueryId queryId) void
startNewFragment
(BitControl.PlanFragment fragment, DrillbitContext drillbitContext) Start a new fragment on this node.
-
Constructor Details
-
ControlMessageHandler
-
-
Method Details
-
handle
public void handle(ControlConnection connection, int rpcType, io.netty.buffer.ByteBuf pBody, io.netty.buffer.ByteBuf dBody, ResponseSender sender) throws RpcException Description copied from interface:RequestHandler
Handle request of given type (rpcType) with message (pBody) and optional data (dBody) on the connection, and return the appropriate response. The method must do one of three things: + usesend
the response + throw UserRpcException, in which case a response will be sent usingsend
+ throw an Exception, in which case, the connection will be dropped- Specified by:
handle
in interfaceRequestHandler<ControlConnection>
- Parameters:
connection
- remote connectionrpcType
- rpc typepBody
- messagedBody
- data, maybe nullsender
- used tosend
the response- Throws:
RpcException
-
startNewFragment
public void startNewFragment(BitControl.PlanFragment fragment, DrillbitContext drillbitContext) throws UserRpcException Start a new fragment on this node. These fragments can be leaf or intermediate fragments which are scheduled by remote or local Foreman node.- Parameters:
fragment
-- Throws:
UserRpcException
-
cancelFragment
-
resumeFragment
-
receivingFragmentFinished
-
requestFragmentStatus
-
initializeFragment
public GeneralRPCProtos.Ack initializeFragment(BitControl.InitializeFragments fragments) throws RpcException - Throws:
RpcException
-
getHandlerRegistry
-