Package org.apache.pinot.common.lineage
Class SegmentLineageAccessHelper
- java.lang.Object
-
- org.apache.pinot.common.lineage.SegmentLineageAccessHelper
-
public class SegmentLineageAccessHelper extends Object
Class to help to read, write segment lineage metadata
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleandeleteSegmentLineage(org.apache.helix.store.zk.ZkHelixPropertyStore<org.apache.helix.zookeeper.datamodel.ZNRecord> propertyStore, String tableNameWithType)Delete the segment lineage from the property storestatic SegmentLineagegetSegmentLineage(org.apache.helix.store.zk.ZkHelixPropertyStore<org.apache.helix.zookeeper.datamodel.ZNRecord> propertyStore, String tableNameWithType)Read the segment lineage from the property storestatic org.apache.helix.zookeeper.datamodel.ZNRecordgetSegmentLineageZNRecord(org.apache.helix.store.zk.ZkHelixPropertyStore<org.apache.helix.zookeeper.datamodel.ZNRecord> propertyStore, String tableNameWithType)Read the segment lineage ZNRecord from the property storestatic booleanwriteSegmentLineage(org.apache.helix.store.zk.ZkHelixPropertyStore<org.apache.helix.zookeeper.datamodel.ZNRecord> propertyStore, SegmentLineage segmentLineage, int expectedVersion)Write the segment lineage to the property store
-
-
-
Method Detail
-
getSegmentLineageZNRecord
public static org.apache.helix.zookeeper.datamodel.ZNRecord getSegmentLineageZNRecord(org.apache.helix.store.zk.ZkHelixPropertyStore<org.apache.helix.zookeeper.datamodel.ZNRecord> propertyStore, String tableNameWithType)Read the segment lineage ZNRecord from the property store- Parameters:
propertyStore- a property storetableNameWithType- a table name with type- Returns:
- a ZNRecord of segment merge lineage, return null if znode does not exist
-
getSegmentLineage
public static SegmentLineage getSegmentLineage(org.apache.helix.store.zk.ZkHelixPropertyStore<org.apache.helix.zookeeper.datamodel.ZNRecord> propertyStore, String tableNameWithType)
Read the segment lineage from the property store- Parameters:
propertyStore- a property storetableNameWithType- a table name with type- Returns:
- a segment lineage, return null if znode does not exist
-
writeSegmentLineage
public static boolean writeSegmentLineage(org.apache.helix.store.zk.ZkHelixPropertyStore<org.apache.helix.zookeeper.datamodel.ZNRecord> propertyStore, SegmentLineage segmentLineage, int expectedVersion)Write the segment lineage to the property store- Parameters:
propertyStore- a property storesegmentLineage- a segment lineageexpectedVersion- expected version of ZNRecord. -1 for indicating to match any version.- Returns:
- true if update is successful. false otherwise.
-
deleteSegmentLineage
public static boolean deleteSegmentLineage(org.apache.helix.store.zk.ZkHelixPropertyStore<org.apache.helix.zookeeper.datamodel.ZNRecord> propertyStore, String tableNameWithType)Delete the segment lineage from the property store- Parameters:
propertyStore- a property storetableNameWithType- a table name with type- Returns:
- true if delete is successful. false otherwise.
-
-