Class SingleConnectionBrokerRequestHandler
- java.lang.Object
-
- org.apache.pinot.broker.requesthandler.BaseBrokerRequestHandler
-
- org.apache.pinot.broker.requesthandler.SingleConnectionBrokerRequestHandler
-
- All Implemented Interfaces:
FailureDetector.Listener,BrokerRequestHandler
@ThreadSafe public class SingleConnectionBrokerRequestHandler extends BaseBrokerRequestHandler implements FailureDetector.Listener
TheSingleConnectionBrokerRequestHandlerclass is a thread-safe broker request handler using a single connection per server to route the queries.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.pinot.broker.requesthandler.BaseBrokerRequestHandler
BaseBrokerRequestHandler.ServerStats
-
-
Field Summary
-
Fields inherited from class org.apache.pinot.broker.requesthandler.BaseBrokerRequestHandler
_accessControlFactory, _brokerId, _brokerMetrics, _brokerTimeoutMs, _config, _queryOptimizer, _queryQuotaManager, _queryResponseLimit, _requestIdGenerator, _routingManager, _tableCache
-
-
Constructor Summary
Constructors Constructor Description SingleConnectionBrokerRequestHandler(org.apache.pinot.spi.env.PinotConfiguration config, String brokerId, BrokerRoutingManager routingManager, AccessControlFactory accessControlFactory, QueryQuotaManager queryQuotaManager, org.apache.pinot.common.config.provider.TableCache tableCache, org.apache.pinot.common.metrics.BrokerMetrics brokerMetrics, org.apache.pinot.common.config.NettyConfig nettyConfig, org.apache.pinot.common.config.TlsConfig tlsConfig, ServerRoutingStatsManager serverRoutingStatsManager)
-
Method Summary
Modifier and Type Method Description voidnotifyHealthyServer(String instanceId, FailureDetector failureDetector)Notifies the listener of a previous unhealthy server turning healthy.voidnotifyUnhealthyServer(String instanceId, FailureDetector failureDetector)Notifies the listener of an unhealthy server.protected org.apache.pinot.common.response.broker.BrokerResponseNativeprocessBrokerRequest(long requestId, org.apache.pinot.common.request.BrokerRequest originalBrokerRequest, org.apache.pinot.common.request.BrokerRequest serverBrokerRequest, org.apache.pinot.common.request.BrokerRequest offlineBrokerRequest, Map<ServerInstance,List<String>> offlineRoutingTable, org.apache.pinot.common.request.BrokerRequest realtimeBrokerRequest, Map<ServerInstance,List<String>> realtimeRoutingTable, long timeoutMs, BaseBrokerRequestHandler.ServerStats serverStats, org.apache.pinot.spi.trace.RequestContext requestContext)Processes the optimized broker requests for both OFFLINE and REALTIME table.voidretryUnhealthyServer(String instanceId, FailureDetector failureDetector)Notifies the listener to retry a previous unhealthy server.voidshutDown()voidstart()-
Methods inherited from class org.apache.pinot.broker.requesthandler.BaseBrokerRequestHandler
augmentStatistics, cancelQuery, getRunningQueries, handleRequest
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pinot.broker.requesthandler.BrokerRequestHandler
handleRequest
-
-
-
-
Constructor Detail
-
SingleConnectionBrokerRequestHandler
public SingleConnectionBrokerRequestHandler(org.apache.pinot.spi.env.PinotConfiguration config, String brokerId, BrokerRoutingManager routingManager, AccessControlFactory accessControlFactory, QueryQuotaManager queryQuotaManager, org.apache.pinot.common.config.provider.TableCache tableCache, org.apache.pinot.common.metrics.BrokerMetrics brokerMetrics, org.apache.pinot.common.config.NettyConfig nettyConfig, org.apache.pinot.common.config.TlsConfig tlsConfig, ServerRoutingStatsManager serverRoutingStatsManager)
-
-
Method Detail
-
start
public void start()
- Specified by:
startin interfaceBrokerRequestHandler
-
shutDown
public void shutDown()
- Specified by:
shutDownin interfaceBrokerRequestHandler
-
processBrokerRequest
protected org.apache.pinot.common.response.broker.BrokerResponseNative processBrokerRequest(long requestId, org.apache.pinot.common.request.BrokerRequest originalBrokerRequest, org.apache.pinot.common.request.BrokerRequest serverBrokerRequest, @Nullable org.apache.pinot.common.request.BrokerRequest offlineBrokerRequest, @Nullable Map<ServerInstance,List<String>> offlineRoutingTable, @Nullable org.apache.pinot.common.request.BrokerRequest realtimeBrokerRequest, @Nullable Map<ServerInstance,List<String>> realtimeRoutingTable, long timeoutMs, BaseBrokerRequestHandler.ServerStats serverStats, org.apache.pinot.spi.trace.RequestContext requestContext) throws ExceptionDescription copied from class:BaseBrokerRequestHandlerProcesses the optimized broker requests for both OFFLINE and REALTIME table. TODO: Directly take PinotQuery- Specified by:
processBrokerRequestin classBaseBrokerRequestHandler- Throws:
Exception
-
notifyUnhealthyServer
public void notifyUnhealthyServer(String instanceId, FailureDetector failureDetector)
Description copied from interface:FailureDetector.ListenerNotifies the listener of an unhealthy server.- Specified by:
notifyUnhealthyServerin interfaceFailureDetector.Listener
-
retryUnhealthyServer
public void retryUnhealthyServer(String instanceId, FailureDetector failureDetector)
Description copied from interface:FailureDetector.ListenerNotifies the listener to retry a previous unhealthy server.- Specified by:
retryUnhealthyServerin interfaceFailureDetector.Listener
-
notifyHealthyServer
public void notifyHealthyServer(String instanceId, FailureDetector failureDetector)
Description copied from interface:FailureDetector.ListenerNotifies the listener of a previous unhealthy server turning healthy.- Specified by:
notifyHealthyServerin interfaceFailureDetector.Listener
-
-