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


##########
pinot-common/src/main/java/org/apache/pinot/common/tier/TierSegmentSelector.java:
##########
@@ -18,21 +18,17 @@
  */
 package org.apache.pinot.common.tier;
 
+import org.apache.pinot.common.metadata.segment.SegmentZKMetadata;
+
+
 /**
  * Interface for the segment selection strategy of a tier
  */
 public interface TierSegmentSelector {
 
-  /**
-   * The type of the segment selector (e.g. TIME)
-   */
+  /// Returns the type of the segment selector (e.g. TIME).
   String getType();
 
-  /**
-   * Checks if the provided segment is eligible for selection to this tier
-   * @param tableNameWithType Name of the table
-   * @param segmentName Name of the segment
-   * @return true if eligible
-   */
-  boolean selectSegment(String tableNameWithType, String segmentName);
+  /// Returns `true` if the segment is eligible for the tier.
+  boolean selectSegment(String tableNameWithType, SegmentZKMetadata 
segmentZKMetadata);

Review Comment:
   That is one reason why we want to pass in `SegmentZKMetadata` instead of 
segment name because the ZK metadata might have not been persisted to ZK yet. 
Without this PR, `SegmentZKMetadata` is fetched within `TierSegmentSelector`, 
and will fail because it is not persisted yet



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