Class PageHeader

    • Field Detail

      • type

        public PageType type
        the type of the page: indicates which of the *_header fields is set *
        See Also:
        PageType
      • 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 32bit CRC for the page, to be be calculated as follows: - Using the standard CRC32 algorithm - On the data only, i.e. this header should not be included. 'Data' hereby refers to the concatenation of the repetition levels, the definition levels and the column value, in this exact order. - On the encoded versions of the repetition levels, definition levels and column values - On the compressed versions of the repetition levels, definition levels and column values where possible; - For v1 data pages, the repetition levels, definition levels and column values are always compressed together. If a compression scheme is specified, the CRC shall be calculated on the compressed version of this concatenation. If no compression scheme is specified, the CRC shall be calculated on the uncompressed version of this concatenation. - For v2 data pages, the repetition levels and definition levels are handled separately from the data and are never compressed (only encoded). If a compression scheme is specified, the CRC shall be calculated on the concatenation of the uncompressed repetition levels, uncompressed definition levels and the compressed column values. If no compression scheme is specified, the CRC shall be calculated on the uncompressed concatenation. If enabled, this allows for disabling checksumming in HDFS if only a few pages need to be read.
      • metaDataMap

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

      • 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 Detail

      • getType

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

        public PageHeader setType​(PageType type)
        the type of the page: indicates which of the *_header fields is set *
        See Also:
        PageType
      • 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 32bit CRC for the page, to be be calculated as follows: - Using the standard CRC32 algorithm - On the data only, i.e. this header should not be included. 'Data' hereby refers to the concatenation of the repetition levels, the definition levels and the column value, in this exact order. - On the encoded versions of the repetition levels, definition levels and column values - On the compressed versions of the repetition levels, definition levels and column values where possible; - For v1 data pages, the repetition levels, definition levels and column values are always compressed together. If a compression scheme is specified, the CRC shall be calculated on the compressed version of this concatenation. If no compression scheme is specified, the CRC shall be calculated on the uncompressed version of this concatenation. - For v2 data pages, the repetition levels and definition levels are handled separately from the data and are never compressed (only encoded). If a compression scheme is specified, the CRC shall be calculated on the concatenation of the uncompressed repetition levels, uncompressed definition levels and the compressed column values. If no compression scheme is specified, the CRC shall be calculated on the uncompressed concatenation. 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 32bit CRC for the page, to be be calculated as follows: - Using the standard CRC32 algorithm - On the data only, i.e. this header should not be included. 'Data' hereby refers to the concatenation of the repetition levels, the definition levels and the column value, in this exact order. - On the encoded versions of the repetition levels, definition levels and column values - On the compressed versions of the repetition levels, definition levels and column values where possible; - For v1 data pages, the repetition levels, definition levels and column values are always compressed together. If a compression scheme is specified, the CRC shall be calculated on the compressed version of this concatenation. If no compression scheme is specified, the CRC shall be calculated on the uncompressed version of this concatenation. - For v2 data pages, the repetition levels and definition levels are handled separately from the data and are never compressed (only encoded). If a compression scheme is specified, the CRC shall be calculated on the concatenation of the uncompressed repetition levels, uncompressed definition levels and the compressed column values. If no compression scheme is specified, the CRC shall be calculated on the uncompressed concatenation. 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)
      • 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)
      • 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)
      • 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)
      • 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)
      • 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​(PageHeader that)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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
      • validate

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