Class TableStateUtils
- java.lang.Object
-
- org.apache.pinot.segment.local.utils.tablestate.TableStateUtils
-
public class TableStateUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>getSegmentsInGivenStateForThisInstance(org.apache.helix.HelixManager helixManager, String tableNameWithType, String state)Returns all segments in a given state for a given table.static booleanisAllSegmentsLoaded(org.apache.helix.HelixManager helixManager, String tableNameWithType)Checks if all segments for the given @param tableNameWithType were 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.
-
-
-
Method Detail
-
getSegmentsInGivenStateForThisInstance
public static List<String> getSegmentsInGivenStateForThisInstance(org.apache.helix.HelixManager helixManager, String tableNameWithType, String state)
Returns all segments in a given state for a given table.- Parameters:
helixManager- instance of Helix managertableNameWithType- table for which we are obtaining segments in a given statestate- state of the segments to be returned- Returns:
- List of segment names in a given state.
-
isAllSegmentsLoaded
public static boolean isAllSegmentsLoaded(org.apache.helix.HelixManager helixManager, String tableNameWithType)Checks if all segments for the given @param tableNameWithType were 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.- Parameters:
helixManager- helix manager for the server instancetableNameWithType- table name for which segment state is to be checked- Returns:
- true if all segments for the given table are succesfully loaded. False otherwise
-
-