Interface BrokerRequestHandler

    • Method Summary

      Modifier and Type Method Description
      boolean cancelQuery​(long queryId, int timeoutMs, Executor executor, org.apache.commons.httpclient.HttpConnectionManager connMgr, Map<String,​Integer> serverResponses)
      Cancel a query as identified by the queryId.
      Map<Long,​String> getRunningQueries()  
      default org.apache.pinot.common.response.BrokerResponse handleRequest​(com.fasterxml.jackson.databind.JsonNode request, RequesterIdentity requesterIdentity, org.apache.pinot.spi.trace.RequestContext requestContext)  
      org.apache.pinot.common.response.BrokerResponse handleRequest​(com.fasterxml.jackson.databind.JsonNode request, org.apache.pinot.sql.parsers.SqlNodeAndOptions sqlNodeAndOptions, RequesterIdentity requesterIdentity, org.apache.pinot.spi.trace.RequestContext requestContext)  
      void shutDown()  
      void start()  
    • Method Detail

      • start

        void start()
      • shutDown

        void shutDown()
      • handleRequest

        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
        Throws:
        Exception
      • handleRequest

        default org.apache.pinot.common.response.BrokerResponse handleRequest​(com.fasterxml.jackson.databind.JsonNode request,
                                                                              @Nullable
                                                                              RequesterIdentity requesterIdentity,
                                                                              org.apache.pinot.spi.trace.RequestContext requestContext)
                                                                       throws Exception
        Throws:
        Exception
      • cancelQuery

        boolean cancelQuery​(long queryId,
                            int timeoutMs,
                            Executor executor,
                            org.apache.commons.httpclient.HttpConnectionManager connMgr,
                            Map<String,​Integer> serverResponses)
                     throws Exception
        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.
        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