jackjlli commented on a change in pull request #8067:
URL: https://github.com/apache/pinot/pull/8067#discussion_r796016680



##########
File path: 
pinot-broker/src/main/java/org/apache/pinot/broker/routing/segmentpruner/SegmentPrunerFactory.java
##########
@@ -45,11 +46,14 @@ private SegmentPrunerFactory() {
 
   public static List<SegmentPruner> getSegmentPruners(TableConfig tableConfig,
       ZkHelixPropertyStore<ZNRecord> propertyStore) {
-    RoutingConfig routingConfig = tableConfig.getRoutingConfig();
     List<SegmentPruner> segmentPruners = new ArrayList<>();
-    // Always prune out empty segments first
-    segmentPruners.add(new EmptySegmentPruner(tableConfig, propertyStore));
+    boolean needsEmptySegment = 
TableConfigUtils.needsEmptySegmentPruner(tableConfig);
+    if (needsEmptySegment) {
+      // Always add EmptySegmentPruner if Kinesis consumer is used.

Review comment:
       Add this sentence to the javadoc of `needsEmptySegmentPruner` method as 
well.

##########
File path: 
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java
##########
@@ -857,4 +860,53 @@ public static void verifyHybridTableConfigs(String 
rawTableName, TableConfig off
   public enum ValidationType {
     ALL, TASK, UPSERT
   }
+
+  /**
+   * Helper method to check is EmptySegmentPruner for a TableConfig.

Review comment:
       Update the description here.




-- 
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