This is an automated email from the ASF dual-hosted git repository.

jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new c7450ab  Make SingleConnectionBrokerRequestHandler as default (#4048)
c7450ab is described below

commit c7450abf6a831cb78e6c9a8692705303d1432cc8
Author: Xiaotian (Jackie) Jiang <[email protected]>
AuthorDate: Mon Apr 1 16:42:31 2019 -0700

    Make SingleConnectionBrokerRequestHandler as default (#4048)
    
    We have verified that comparing to the old 
ConnectionPoolBrokerRequestHandler, SingleConnectionBrokerRequestHander can 
improve thread utilization and significanly reduce request sending errors
---
 .../org/apache/pinot/broker/broker/BrokerServerBuilder.java | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git 
a/pinot-broker/src/main/java/org/apache/pinot/broker/broker/BrokerServerBuilder.java
 
b/pinot-broker/src/main/java/org/apache/pinot/broker/broker/BrokerServerBuilder.java
index 39b25bf..387e214 100644
--- 
a/pinot-broker/src/main/java/org/apache/pinot/broker/broker/BrokerServerBuilder.java
+++ 
b/pinot-broker/src/main/java/org/apache/pinot/broker/broker/BrokerServerBuilder.java
@@ -46,8 +46,9 @@ public class BrokerServerBuilder {
   public static final String METRICS_CONFIG_PREFIX = "pinot.broker.metrics";
   public static final String TABLE_LEVEL_METRICS_CONFIG = 
"pinot.broker.enableTableLevelMetrics";
   public static final String REQUEST_HANDLER_TYPE_CONFIG = 
"pinot.broker.requestHandlerType";
-  public static final String DEFAULT_REQUEST_HANDLER_TYPE = "connectionPool";
   public static final String SINGLE_CONNECTION_REQUEST_HANDLER_TYPE = 
"singleConnection";
+  public static final String CONNECTION_POOL_REQUEST_HANDLER_TYPE = 
"connectionPool";
+  public static final String DEFAULT_REQUEST_HANDLER_TYPE = 
SINGLE_CONNECTION_REQUEST_HANDLER_TYPE;
 
   public enum State {
     INIT, STARTING, RUNNING, SHUTTING_DOWN, SHUTDOWN
@@ -89,14 +90,14 @@ public class BrokerServerBuilder {
 
   private BrokerRequestHandler buildRequestHandler() {
     String requestHandlerType = _config.getString(REQUEST_HANDLER_TYPE_CONFIG, 
DEFAULT_REQUEST_HANDLER_TYPE);
-    if 
(requestHandlerType.equalsIgnoreCase(SINGLE_CONNECTION_REQUEST_HANDLER_TYPE)) {
-      LOGGER.info("Using SingleConnectionBrokerRequestHandler");
-      return new SingleConnectionBrokerRequestHandler(_config, _routingTable, 
_timeBoundaryService,
-          _accessControlFactory, _tableQueryQuotaManager, _brokerMetrics);
-    } else {
+    if 
(requestHandlerType.equalsIgnoreCase(CONNECTION_POOL_REQUEST_HANDLER_TYPE)) {
       LOGGER.info("Using ConnectionPoolBrokerRequestHandler");
       return new ConnectionPoolBrokerRequestHandler(_config, _routingTable, 
_timeBoundaryService, _accessControlFactory,
           _tableQueryQuotaManager, _brokerMetrics, _liveInstanceChangeHandler, 
_metricsRegistry);
+    } else {
+      LOGGER.info("Using SingleConnectionBrokerRequestHandler");
+      return new SingleConnectionBrokerRequestHandler(_config, _routingTable, 
_timeBoundaryService,
+          _accessControlFactory, _tableQueryQuotaManager, _brokerMetrics);
     }
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to