Class PageHeader

java.lang.Object
org.apache.parquet.format.PageHeader
All Implemented Interfaces:
Serializable, Cloneable, Comparable<PageHeader>, org.apache.thrift.TBase<PageHeader,PageHeader._Fields>, org.apache.thrift.TSerializable

@Generated(value="Autogenerated by Thrift Compiler (0.23.0)", date="2026-08-06") public class PageHeader extends Object implements org.apache.thrift.TBase<PageHeader,PageHeader._Fields>, Serializable, Cloneable, Comparable<PageHeader>
See Also:
  • Field Details

    • type

      public PageType type
      the type of the page: indicates which of the *_header fields is set *
      See Also:
    • uncompressed_page_size

      public int uncompressed_page_size
      Uncompressed page size in bytes (not including this header) *
    • compressed_page_size

      public int compressed_page_size
      Compressed (and potentially encrypted) page size in bytes, not including this header *
    • crc

      public int crc
      The 32-bit CRC checksum for the page, to be calculated as follows: - The standard CRC32 algorithm is used (with polynomial 0x04C11DB7, the same as in e.g. GZIP). - All page types can have a CRC (v1 and v2 data pages, dictionary pages, etc.). - The CRC is computed on the serialization binary representation of the page (as written to disk), excluding the page header. For example, for v1 data pages, the CRC is computed on the concatenation of repetition levels, definition levels and column values (optionally compressed, optionally encrypted). - The CRC computation therefore takes place after any compression and encryption steps, if any. If enabled, this allows for disabling checksumming in HDFS if only a few pages need to be read.
    • data_page_header

      public DataPageHeader data_page_header
    • index_page_header

      public IndexPageHeader index_page_header
    • dictionary_page_header

      public DictionaryPageHeader dictionary_page_header
    • data_page_header_v2

      public DataPageHeaderV2 data_page_header_v2
    • metaDataMap

      public static final Map<PageHeader._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
  • Constructor Details

    • PageHeader

      public PageHeader()
    • PageHeader

      public PageHeader(PageType type, int uncompressed_page_size, int compressed_page_size)
    • PageHeader

      public PageHeader(PageHeader other)
      Performs a deep copy on other.
  • Method Details

    • deepCopy

      public PageHeader deepCopy()
      Specified by:
      deepCopy in interface org.apache.thrift.TBase<PageHeader,PageHeader._Fields>
    • clear

      public void clear()
      Specified by:
      clear in interface org.apache.thrift.TBase<PageHeader,PageHeader._Fields>
    • getType

      public PageType getType()
      the type of the page: indicates which of the *_header fields is set *
      See Also:
    • setType

      public PageHeader setType(PageType type)
      the type of the page: indicates which of the *_header fields is set *
      See Also:
    • unsetType

      public void unsetType()
    • isSetType

      public boolean isSetType()
      Returns true if field type is set (has been assigned a value) and false otherwise
    • setTypeIsSet

      public void setTypeIsSet(boolean value)
    • getUncompressed_page_size

      public int getUncompressed_page_size()
      Uncompressed page size in bytes (not including this header) *
    • setUncompressed_page_size

      public PageHeader setUncompressed_page_size(int uncompressed_page_size)
      Uncompressed page size in bytes (not including this header) *
    • unsetUncompressed_page_size

      public void unsetUncompressed_page_size()
    • isSetUncompressed_page_size

      public boolean isSetUncompressed_page_size()
      Returns true if field uncompressed_page_size is set (has been assigned a value) and false otherwise
    • setUncompressed_page_sizeIsSet

      public void setUncompressed_page_sizeIsSet(boolean value)
    • getCompressed_page_size

      public int getCompressed_page_size()
      Compressed (and potentially encrypted) page size in bytes, not including this header *
    • setCompressed_page_size

      public PageHeader setCompressed_page_size(int compressed_page_size)
      Compressed (and potentially encrypted) page size in bytes, not including this header *
    • unsetCompressed_page_size

      public void unsetCompressed_page_size()
    • isSetCompressed_page_size

      public boolean isSetCompressed_page_size()
      Returns true if field compressed_page_size is set (has been assigned a value) and false otherwise
    • setCompressed_page_sizeIsSet

      public void setCompressed_page_sizeIsSet(boolean value)
    • getCrc

      public int getCrc()
      The 32-bit CRC checksum for the page, to be calculated as follows: - The standard CRC32 algorithm is used (with polynomial 0x04C11DB7, the same as in e.g. GZIP). - All page types can have a CRC (v1 and v2 data pages, dictionary pages, etc.). - The CRC is computed on the serialization binary representation of the page (as written to disk), excluding the page header. For example, for v1 data pages, the CRC is computed on the concatenation of repetition levels, definition levels and column values (optionally compressed, optionally encrypted). - The CRC computation therefore takes place after any compression and encryption steps, if any. If enabled, this allows for disabling checksumming in HDFS if only a few pages need to be read.
    • setCrc

      public PageHeader setCrc(int crc)
      The 32-bit CRC checksum for the page, to be calculated as follows: - The standard CRC32 algorithm is used (with polynomial 0x04C11DB7, the same as in e.g. GZIP). - All page types can have a CRC (v1 and v2 data pages, dictionary pages, etc.). - The CRC is computed on the serialization binary representation of the page (as written to disk), excluding the page header. For example, for v1 data pages, the CRC is computed on the concatenation of repetition levels, definition levels and column values (optionally compressed, optionally encrypted). - The CRC computation therefore takes place after any compression and encryption steps, if any. If enabled, this allows for disabling checksumming in HDFS if only a few pages need to be read.
    • unsetCrc

      public void unsetCrc()
    • isSetCrc

      public boolean isSetCrc()
      Returns true if field crc is set (has been assigned a value) and false otherwise
    • setCrcIsSet

      public void setCrcIsSet(boolean value)
    • getData_page_header

      public DataPageHeader getData_page_header()
    • setData_page_header

      public PageHeader setData_page_header(DataPageHeader data_page_header)
    • unsetData_page_header

      public void unsetData_page_header()
    • isSetData_page_header

      public boolean isSetData_page_header()
      Returns true if field data_page_header is set (has been assigned a value) and false otherwise
    • setData_page_headerIsSet

      public void setData_page_headerIsSet(boolean value)
    • getIndex_page_header

      public IndexPageHeader getIndex_page_header()
    • setIndex_page_header

      public PageHeader setIndex_page_header(IndexPageHeader index_page_header)
    • unsetIndex_page_header

      public void unsetIndex_page_header()
    • isSetIndex_page_header

      public boolean isSetIndex_page_header()
      Returns true if field index_page_header is set (has been assigned a value) and false otherwise
    • setIndex_page_headerIsSet

      public void setIndex_page_headerIsSet(boolean value)
    • getDictionary_page_header

      public DictionaryPageHeader getDictionary_page_header()
    • setDictionary_page_header

      public PageHeader setDictionary_page_header(DictionaryPageHeader dictionary_page_header)
    • unsetDictionary_page_header

      public void unsetDictionary_page_header()
    • isSetDictionary_page_header

      public boolean isSetDictionary_page_header()
      Returns true if field dictionary_page_header is set (has been assigned a value) and false otherwise
    • setDictionary_page_headerIsSet

      public void setDictionary_page_headerIsSet(boolean value)
    • getData_page_header_v2

      public DataPageHeaderV2 getData_page_header_v2()
    • setData_page_header_v2

      public PageHeader setData_page_header_v2(DataPageHeaderV2 data_page_header_v2)
    • unsetData_page_header_v2

      public void unsetData_page_header_v2()
    • isSetData_page_header_v2

      public boolean isSetData_page_header_v2()
      Returns true if field data_page_header_v2 is set (has been assigned a value) and false otherwise
    • setData_page_header_v2IsSet

      public void setData_page_header_v2IsSet(boolean value)
    • setFieldValue

      public void setFieldValue(PageHeader._Fields field, Object value)
      Specified by:
      setFieldValue in interface org.apache.thrift.TBase<PageHeader,PageHeader._Fields>
    • getFieldValue

      public Object getFieldValue(PageHeader._Fields field)
      Specified by:
      getFieldValue in interface org.apache.thrift.TBase<PageHeader,PageHeader._Fields>
    • isSet

      public boolean isSet(PageHeader._Fields field)
      Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
      Specified by:
      isSet in interface org.apache.thrift.TBase<PageHeader,PageHeader._Fields>
    • equals

      public boolean equals(Object that)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(PageHeader that)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(PageHeader other)
      Specified by:
      compareTo in interface Comparable<PageHeader>
    • fieldForId

      public PageHeader._Fields fieldForId(int fieldId)
      Specified by:
      fieldForId in interface org.apache.thrift.TBase<PageHeader,PageHeader._Fields>
    • read

      public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException
      Specified by:
      read in interface org.apache.thrift.TSerializable
      Throws:
      org.apache.thrift.TException
    • write

      public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException
      Specified by:
      write in interface org.apache.thrift.TSerializable
      Throws:
      org.apache.thrift.TException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validate

      public void validate() throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException