Package org.apache.parquet.format
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.13.0)", date="2021-09-30") public class PageHeader extends Object implements org.apache.thrift.TBase<PageHeader,PageHeader._Fields>, Serializable, Cloneable, Comparable<PageHeader>
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPageHeader._FieldsThe set of fields this struct contains, along with convenience methods for finding and manipulating them.
-
Field Summary
Fields Modifier and Type Field Description intcompressed_page_sizeCompressed (and potentially encrypted) page size in bytes, not including this header *intcrcThe 32bit CRC for the page, to be be calculated as follows: - Using the standard CRC32 algorithm - On the data only, i.e.DataPageHeaderdata_page_headerDataPageHeaderV2data_page_header_v2DictionaryPageHeaderdictionary_page_headerIndexPageHeaderindex_page_headerstatic Map<PageHeader._Fields,org.apache.thrift.meta_data.FieldMetaData>metaDataMapPageTypetypethe type of the page: indicates which of the *_header fields is set *intuncompressed_page_sizeUncompressed page size in bytes (not including this header) *
-
Constructor Summary
Constructors Constructor Description PageHeader()PageHeader(PageHeader other)Performs a deep copy on other.PageHeader(PageType type, int uncompressed_page_size, int compressed_page_size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()intcompareTo(PageHeader other)PageHeaderdeepCopy()booleanequals(Object that)booleanequals(PageHeader that)PageHeader._FieldsfieldForId(int fieldId)intgetCompressed_page_size()Compressed (and potentially encrypted) page size in bytes, not including this header *intgetCrc()The 32bit CRC for the page, to be be calculated as follows: - Using the standard CRC32 algorithm - On the data only, i.e.DataPageHeadergetData_page_header()DataPageHeaderV2getData_page_header_v2()DictionaryPageHeadergetDictionary_page_header()ObjectgetFieldValue(PageHeader._Fields field)IndexPageHeadergetIndex_page_header()PageTypegetType()the type of the page: indicates which of the *_header fields is set *intgetUncompressed_page_size()Uncompressed page size in bytes (not including this header) *inthashCode()booleanisSet(PageHeader._Fields field)Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwisebooleanisSetCompressed_page_size()Returns true if field compressed_page_size is set (has been assigned a value) and false otherwisebooleanisSetCrc()Returns true if field crc is set (has been assigned a value) and false otherwisebooleanisSetData_page_header()Returns true if field data_page_header is set (has been assigned a value) and false otherwisebooleanisSetData_page_header_v2()Returns true if field data_page_header_v2 is set (has been assigned a value) and false otherwisebooleanisSetDictionary_page_header()Returns true if field dictionary_page_header is set (has been assigned a value) and false otherwisebooleanisSetIndex_page_header()Returns true if field index_page_header is set (has been assigned a value) and false otherwisebooleanisSetType()Returns true if field type is set (has been assigned a value) and false otherwisebooleanisSetUncompressed_page_size()Returns true if field uncompressed_page_size is set (has been assigned a value) and false otherwisevoidread(org.apache.thrift.protocol.TProtocol iprot)PageHeadersetCompressed_page_size(int compressed_page_size)Compressed (and potentially encrypted) page size in bytes, not including this header *voidsetCompressed_page_sizeIsSet(boolean value)PageHeadersetCrc(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.voidsetCrcIsSet(boolean value)PageHeadersetData_page_header(DataPageHeader data_page_header)PageHeadersetData_page_header_v2(DataPageHeaderV2 data_page_header_v2)voidsetData_page_header_v2IsSet(boolean value)voidsetData_page_headerIsSet(boolean value)PageHeadersetDictionary_page_header(DictionaryPageHeader dictionary_page_header)voidsetDictionary_page_headerIsSet(boolean value)voidsetFieldValue(PageHeader._Fields field, Object value)PageHeadersetIndex_page_header(IndexPageHeader index_page_header)voidsetIndex_page_headerIsSet(boolean value)PageHeadersetType(PageType type)the type of the page: indicates which of the *_header fields is set *voidsetTypeIsSet(boolean value)PageHeadersetUncompressed_page_size(int uncompressed_page_size)Uncompressed page size in bytes (not including this header) *voidsetUncompressed_page_sizeIsSet(boolean value)StringtoString()voidunsetCompressed_page_size()voidunsetCrc()voidunsetData_page_header()voidunsetData_page_header_v2()voidunsetDictionary_page_header()voidunsetIndex_page_header()voidunsetType()voidunsetUncompressed_page_size()voidvalidate()voidwrite(org.apache.thrift.protocol.TProtocol oprot)
-
-
-
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.
-
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 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
-
deepCopy
public PageHeader deepCopy()
- Specified by:
deepCopyin interfaceorg.apache.thrift.TBase<PageHeader,PageHeader._Fields>
-
clear
public void clear()
- Specified by:
clearin interfaceorg.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:
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)
-
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:
setFieldValuein interfaceorg.apache.thrift.TBase<PageHeader,PageHeader._Fields>
-
getFieldValue
public Object getFieldValue(PageHeader._Fields field)
- Specified by:
getFieldValuein interfaceorg.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:
isSetin interfaceorg.apache.thrift.TBase<PageHeader,PageHeader._Fields>
-
equals
public boolean equals(PageHeader that)
-
compareTo
public int compareTo(PageHeader other)
- Specified by:
compareToin interfaceComparable<PageHeader>
-
fieldForId
public PageHeader._Fields fieldForId(int fieldId)
- Specified by:
fieldForIdin interfaceorg.apache.thrift.TBase<PageHeader,PageHeader._Fields>
-
read
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException- Specified by:
readin interfaceorg.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:
writein interfaceorg.apache.thrift.TSerializable- Throws:
org.apache.thrift.TException
-
validate
public void validate() throws org.apache.thrift.TException- Throws:
org.apache.thrift.TException
-
-