Class SegmentPartitionMetadata


  • public class SegmentPartitionMetadata
    extends Object
    Class for partition metadata for a segment.
    • Field Detail

    • Constructor Detail

      • SegmentPartitionMetadata

        public SegmentPartitionMetadata​(@Nonnull
                                        Map<String,​ColumnPartitionMetadata> columnPartitionMap)
        Constructor for the class.
        Parameters:
        columnPartitionMap - Column name to ColumnPartitionMetadata map.
    • Method Detail

      • getColumnPartitionMap

        public Map<String,​ColumnPartitionMetadata> getColumnPartitionMap()
        Returns the map from column name to column's partition metadata.
        Returns:
        Map from column name to its partition metadata.
      • getFunctionName

        @Nullable
        public String getFunctionName​(@Nonnull
                                      String column)
        Returns the partition function for the given column, null if there isn't one.
        Parameters:
        column - Column for which to return the partition function.
        Returns:
        Partition function for the column.
      • toJsonString

        public String toJsonString()
                            throws IOException
        Returns the JSON equivalent of the object.
        Returns:
        JSON string equivalent of the object.
        Throws:
        IOException
      • getNumPartitions

        public int getNumPartitions​(String column)
        Returns the number of partitions for the specified column. Returns INVALID_NUM_PARTITIONS if it does not exist for the column.
        Parameters:
        column - Column for which to get number of partitions.
        Returns:
        Number of partitions of the column.
      • getPartitions

        public Set<Integer> getPartitions​(String column)
        Returns the set of partitions for the specified column, or null if the column is not partitioned.
        Parameters:
        column - Column for which to return the set of partitions
        Returns:
        Set of partitions for the specified column
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object