You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/12/21 22:50:10 UTC

[GitHub] [pinot] npawar commented on a change in pull request #7925: Add help methods to check if segment needs reprocessing

npawar commented on a change in pull request #7925:
URL: https://github.com/apache/pinot/pull/7925#discussion_r773489697



##########
File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/bloomfilter/BloomFilterHandler.java
##########
@@ -54,52 +55,59 @@
 public class BloomFilterHandler implements IndexHandler {
   private static final Logger LOGGER = LoggerFactory.getLogger(BloomFilterHandler.class);
 
-  private final File _indexDir;
-  private final SegmentMetadataImpl _segmentMetadata;
-  private final SegmentDirectory.Writer _segmentWriter;
+  private final SegmentMetadata _segmentMetadata;
   private final Map<String, BloomFilterConfig> _bloomFilterConfigs;
-  private final BloomFilterCreatorProvider _indexCreatorProvider;
 
-  public BloomFilterHandler(File indexDir, SegmentMetadataImpl segmentMetadata, IndexLoadingConfig indexLoadingConfig,
-      SegmentDirectory.Writer segmentWriter, BloomFilterCreatorProvider indexCreatorProvider) {
-    _indexDir = indexDir;
-    _segmentWriter = segmentWriter;
+  public BloomFilterHandler(SegmentMetadata segmentMetadata, IndexLoadingConfig indexLoadingConfig) {
     _segmentMetadata = segmentMetadata;
     _bloomFilterConfigs = indexLoadingConfig.getBloomFilterConfigs();
-    _indexCreatorProvider = indexCreatorProvider;
   }
 
   @Override
-  public void updateIndices()
+  public boolean needUpdateIndices(SegmentDirectory.Reader segmentReader) {
+    Set<String> columnsToAddBF = new HashSet<>(_bloomFilterConfigs.keySet());

Review comment:
       Mostly lgtm.
   Minor comment: can this code be moved into a util? any updates needed to be made to this logic in the future will stay in one place




-- 
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-unsubscribe@pinot.apache.org

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



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