Interface BrokerRequestHandler
-
- All Known Implementing Classes:
BaseBrokerRequestHandler,BrokerRequestHandlerDelegate,GrpcBrokerRequestHandler,MultiStageBrokerRequestHandler,SingleConnectionBrokerRequestHandler
@ThreadSafe public interface BrokerRequestHandler
-
-
Method Summary
Modifier and Type Method Description booleancancelQuery(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.BrokerResponsehandleRequest(com.fasterxml.jackson.databind.JsonNode request, RequesterIdentity requesterIdentity, org.apache.pinot.spi.trace.RequestContext requestContext)org.apache.pinot.common.response.BrokerResponsehandleRequest(com.fasterxml.jackson.databind.JsonNode request, org.apache.pinot.sql.parsers.SqlNodeAndOptions sqlNodeAndOptions, RequesterIdentity requesterIdentity, org.apache.pinot.spi.trace.RequestContext requestContext)voidshutDown()voidstart()
-
-
-
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 ExceptionCancel 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 brokertimeoutMs- timeout to wait for servers to respond the cancel requestsexecutor- to send cancel requests to servers in parallelconnMgr- to provide the http connectionsserverResponses- 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
-
-