Class SegmentPartitionUtils


  • public class SegmentPartitionUtils
    extends Object
    • 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: Returns null when the ZNRecord is missing (could be transient Helix issue). Returns INVALID_PARTITION_INFO when 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: Returns null when the ZNRecord is missing (could be transient Helix issue). Returns INVALID_COLUMN_PARTITION_INFO_MAP when the segment does not have valid partition metadata in its ZK metadata, in which case we won't retry later.