jugomezv commented on code in PR #9994:
URL: https://github.com/apache/pinot/pull/9994#discussion_r1065219405


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/tablestate/TableStateUtils.java:
##########
@@ -39,37 +39,56 @@ private TableStateUtils() {
   }
 
   /**
-   * Checks if all segments for the given @param tableNameWithType are 
succesfully loaded
-   * This function will get all segments in IDEALSTATE and CURRENTSTATE for 
the given table,
-   * and then check if all ONLINE segments in IDEALSTATE match with 
CURRENTSTATE.
-   * @param helixManager helix manager for the server instance
-   * @param tableNameWithType table name for which segment state is to be 
checked
-   * @return true if all segments for the given table are succesfully loaded. 
False otherwise
+   * Returns all segments in a given state for a given table.
+   *
+   * @param helixManager instance of Helix manager
+   * @param tableNameWithType table for which we are obtaining ONLINE segments
+   * @param state state of the segments to be returned
+   *
+   * @return List of segment names in a given state.
    */
-  public static boolean isAllSegmentsLoaded(HelixManager helixManager, String 
tableNameWithType) {
+  public static Set<String> 
getSegmentsInGivenStateForThisInstance(HelixManager helixManager, String 
tableNameWithType,

Review Comment:
   Was list before and changed to a set as we needed it in the other call of 
this function but rolled back the change, see 
3ce7b783c5dc88073106f400f00783ba4ab71281



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