Class SegmentPartitionUtils
- java.lang.Object
-
- org.apache.pinot.broker.routing.segmentpartition.SegmentPartitionUtils
-
public class SegmentPartitionUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static Map<String,SegmentPartitionInfo>INVALID_COLUMN_PARTITION_INFO_MAPstatic SegmentPartitionInfoINVALID_PARTITION_INFO
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SegmentPartitionInfoextractPartitionInfo(String tableNameWithType, String partitionColumn, String segment, org.apache.helix.zookeeper.datamodel.ZNRecord znRecord)Returns the partition info for a given segment with single partition column.static Map<String,SegmentPartitionInfo>extractPartitionInfoMap(String tableNameWithType, Set<String> partitionColumns, String segment, org.apache.helix.zookeeper.datamodel.ZNRecord znRecord)Returns a map from partition column name to partition info for a given segment with multiple partition columns.
-
-
-
Field Detail
-
INVALID_PARTITION_INFO
public static final SegmentPartitionInfo INVALID_PARTITION_INFO
-
INVALID_COLUMN_PARTITION_INFO_MAP
public static final Map<String,SegmentPartitionInfo> INVALID_COLUMN_PARTITION_INFO_MAP
-
-
Method Detail
-
extractPartitionInfo
@Nullable public static SegmentPartitionInfo extractPartitionInfo(String tableNameWithType, String partitionColumn, String segment, @Nullable org.apache.helix.zookeeper.datamodel.ZNRecord znRecord)
Returns the partition info for a given segment with single partition column. NOTE: Returnsnullwhen the ZNRecord is missing (could be transient Helix issue). ReturnsINVALID_PARTITION_INFOwhen the segment does not have valid partition metadata in its ZK metadata, in which case we won't retry later.
-
extractPartitionInfoMap
@Nullable public static Map<String,SegmentPartitionInfo> extractPartitionInfoMap(String tableNameWithType, Set<String> partitionColumns, String segment, @Nullable org.apache.helix.zookeeper.datamodel.ZNRecord znRecord)
Returns a map from partition column name to partition info for a given segment with multiple partition columns. NOTE: Returnsnullwhen the ZNRecord is missing (could be transient Helix issue). ReturnsINVALID_COLUMN_PARTITION_INFO_MAPwhen the segment does not have valid partition metadata in its ZK metadata, in which case we won't retry later.
-
-