Jackie-Jiang commented on code in PR #12510:
URL: https://github.com/apache/pinot/pull/12510#discussion_r1509748576


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -1773,15 +1774,17 @@ private void setMaxServerResponseSizeBytes(int 
numServers, Map<String, String> q
     }
 
     // BrokerConfig
-    Long maxServerResponseSizeBrokerConfig =
-        _config.getProperty(Broker.CONFIG_OF_MAX_SERVER_RESPONSE_SIZE_BYTES, 
Long.class);
-    if (maxServerResponseSizeBrokerConfig != null) {
-      queryOptions.put(QueryOptionKey.MAX_SERVER_RESPONSE_SIZE_BYTES, 
Long.toString(maxServerResponseSizeBrokerConfig));
+    String strResponseSize = 
_config.getProperty(Broker.CONFIG_OF_MAX_SERVER_RESPONSE_SIZE_BYTES);
+    if (strResponseSize != null) {
+      Long maxServerResponseSizeBrokerConfig = 
DataSizeUtils.toBytes(strResponseSize);
+      queryOptions.put(QueryOptionKey.MAX_SERVER_RESPONSE_SIZE_BYTES,
+          Long.toString(maxServerResponseSizeBrokerConfig));

Review Comment:
   ```suggestion
       String maxServerResponseSizeBrokerConfig = 
_config.getProperty(Broker.CONFIG_OF_MAX_SERVER_RESPONSE_SIZE_BYTES);
       if (maxServerResponseSizeBrokerConfig != null) {
         queryOptions.put(QueryOptionKey.MAX_SERVER_RESPONSE_SIZE_BYTES,
             Long.toString(DataSizeUtils.toBytes(strResponseSize)));
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to