Class BrokerRequestHandlerDelegate

    • Constructor Detail

      • BrokerRequestHandlerDelegate

        public BrokerRequestHandlerDelegate​(String brokerId,
                                            BrokerRequestHandler singleStageBrokerRequestHandler,
                                            @Nullable
                                            BrokerRequestHandler multiStageWorkerRequestHandler,
                                            org.apache.pinot.common.metrics.BrokerMetrics brokerMetrics)
    • Method Detail

      • handleRequest

        public org.apache.pinot.common.response.BrokerResponse handleRequest​(com.fasterxml.jackson.databind.JsonNode request,
                                                                             @Nullable
                                                                             org.apache.pinot.sql.parsers.SqlNodeAndOptions sqlNodeAndOptions,
                                                                             @Nullable
                                                                             RequesterIdentity requesterIdentity,
                                                                             org.apache.pinot.spi.trace.RequestContext requestContext)
                                                                      throws Exception
        Specified by:
        handleRequest in interface BrokerRequestHandler
        Throws:
        Exception
      • cancelQuery

        public boolean cancelQuery​(long queryId,
                                   int timeoutMs,
                                   Executor executor,
                                   org.apache.commons.httpclient.HttpConnectionManager connMgr,
                                   Map<String,​Integer> serverResponses)
                            throws Exception
        Description copied from interface: BrokerRequestHandler
        Cancel a query as identified by the queryId. This method is non-blocking so the query may still run for a while after calling this method. This cancel method can be called multiple times.
        Specified by:
        cancelQuery in interface BrokerRequestHandler
        Parameters:
        queryId - the unique Id assigned to the query by the broker
        timeoutMs - timeout to wait for servers to respond the cancel requests
        executor - to send cancel requests to servers in parallel
        connMgr - to provide the http connections
        serverResponses - to collect cancel responses from all servers if a map is provided
        Returns:
        true if there is a running query for the given queryId.
        Throws:
        Exception