Class ColumnChunkMetaData
java.lang.Object
org.apache.parquet.hadoop.metadata.ColumnChunkMetaData
Column meta data for a block stored in the file footer and passed in the InputSplit
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedColumnChunkMetaData(org.apache.parquet.column.EncodingStats encodingStats, ColumnChunkProperties columnChunkProperties) protectedColumnChunkMetaData(ColumnChunkProperties columnChunkProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidstatic ColumnChunkMetaDataget(org.apache.parquet.hadoop.metadata.ColumnPath path, org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName type, org.apache.parquet.hadoop.metadata.CompressionCodecName codec, Set<org.apache.parquet.column.Encoding> encodings, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize) Deprecated.static ColumnChunkMetaDataget(org.apache.parquet.hadoop.metadata.ColumnPath path, org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName type, org.apache.parquet.hadoop.metadata.CompressionCodecName codec, Set<org.apache.parquet.column.Encoding> encodings, org.apache.parquet.column.statistics.Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize) Deprecated.static ColumnChunkMetaDataget(org.apache.parquet.hadoop.metadata.ColumnPath path, org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName type, org.apache.parquet.hadoop.metadata.CompressionCodecName codec, org.apache.parquet.column.EncodingStats encodingStats, Set<org.apache.parquet.column.Encoding> encodings, org.apache.parquet.column.statistics.Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize) Deprecated.will be removed in 2.0.0.static ColumnChunkMetaDataget(org.apache.parquet.hadoop.metadata.ColumnPath path, org.apache.parquet.schema.PrimitiveType type, org.apache.parquet.hadoop.metadata.CompressionCodecName codec, org.apache.parquet.column.EncodingStats encodingStats, Set<org.apache.parquet.column.Encoding> encodings, org.apache.parquet.column.statistics.Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize) static ColumnChunkMetaDataget(org.apache.parquet.hadoop.metadata.ColumnPath path, org.apache.parquet.schema.PrimitiveType type, org.apache.parquet.hadoop.metadata.CompressionCodecName codec, org.apache.parquet.column.EncodingStats encodingStats, Set<org.apache.parquet.column.Encoding> encodings, org.apache.parquet.column.statistics.Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize, org.apache.parquet.column.statistics.SizeStatistics sizeStatistics) static ColumnChunkMetaDataget(org.apache.parquet.hadoop.metadata.ColumnPath path, org.apache.parquet.schema.PrimitiveType type, org.apache.parquet.hadoop.metadata.CompressionCodecName codec, org.apache.parquet.column.EncodingStats encodingStats, Set<org.apache.parquet.column.Encoding> encodings, org.apache.parquet.column.statistics.Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize, org.apache.parquet.column.statistics.SizeStatistics sizeStatistics, org.apache.parquet.column.statistics.geospatial.GeospatialStatistics geospatialStats) intlongorg.apache.parquet.hadoop.metadata.CompressionCodecNamegetCodec()Method should be considered privateabstract longSet<org.apache.parquet.column.Encoding>org.apache.parquet.column.EncodingStatsabstract longorg.apache.parquet.column.statistics.geospatial.GeospatialStatisticsMethod should be considered privateorg.apache.parquet.hadoop.metadata.ColumnPathgetPath()org.apache.parquet.schema.PrimitiveTypeintorg.apache.parquet.column.statistics.SizeStatisticsMethod should be considered privatelongabstract org.apache.parquet.column.statistics.Statisticsabstract longabstract longorg.apache.parquet.schema.PrimitiveType.PrimitiveTypeNamegetType()Deprecated.will be removed in 2.0.0.abstract longstatic ColumnChunkMetaDatagetWithEncryptedMetadata(ParquetMetadataConverter parquetMetadataConverter, org.apache.parquet.hadoop.metadata.ColumnPath path, org.apache.parquet.schema.PrimitiveType type, byte[] encryptedMetadata, byte[] columnKeyMetadata, InternalFileDecryptor fileDecryptor, int rowGroupOrdinal, int columnOrdinal, String createdBy) booleanbooleanMethod should be considered privateprotected static booleanpositiveLongFitsInAnInt(long value) checks that a positive long value fits in an int.voidsetBloomFilterLength(int bloomFilterLength) voidsetBloomFilterOffset(long bloomFilterOffset) Method should be considered privatevoidsetColumnIndexReference(IndexReference indexReference) Method should be considered privatevoidsetOffsetIndexReference(IndexReference offsetIndexReference) Method should be considered privatevoidsetRowGroupOrdinal(int rowGroupOrdinal) toString()
-
Field Details
-
rowGroupOrdinal
protected int rowGroupOrdinal
-
-
Constructor Details
-
ColumnChunkMetaData
-
ColumnChunkMetaData
protected ColumnChunkMetaData(org.apache.parquet.column.EncodingStats encodingStats, ColumnChunkProperties columnChunkProperties)
-
-
Method Details
-
get
@Deprecated public static ColumnChunkMetaData get(org.apache.parquet.hadoop.metadata.ColumnPath path, org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName type, org.apache.parquet.hadoop.metadata.CompressionCodecName codec, Set<org.apache.parquet.column.Encoding> encodings, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize) Deprecated. -
get
@Deprecated public static ColumnChunkMetaData get(org.apache.parquet.hadoop.metadata.ColumnPath path, org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName type, org.apache.parquet.hadoop.metadata.CompressionCodecName codec, Set<org.apache.parquet.column.Encoding> encodings, org.apache.parquet.column.statistics.Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize) Deprecated. -
get
@Deprecated public static ColumnChunkMetaData get(org.apache.parquet.hadoop.metadata.ColumnPath path, org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName type, org.apache.parquet.hadoop.metadata.CompressionCodecName codec, org.apache.parquet.column.EncodingStats encodingStats, Set<org.apache.parquet.column.Encoding> encodings, org.apache.parquet.column.statistics.Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize) Deprecated.will be removed in 2.0.0. Useget(ColumnPath, PrimitiveType, CompressionCodecName, EncodingStats, Set, Statistics, long, long, long, long, long)instead.- Parameters:
path- the path of this column in the write schematype- primitive type for this columncodec- the compression codec used to compressencodingStats- EncodingStats for the encodings used in this columnencodings- a set of encoding used in this columnstatistics- statistics for the data in this columnfirstDataPage- offset of the first non-dictionary pagedictionaryPageOffset- offset of the the dictionary pagevalueCount- number of valuestotalSize- total compressed sizetotalUncompressedSize- uncompressed data size- Returns:
- a column chunk metadata instance
-
get
public static ColumnChunkMetaData get(org.apache.parquet.hadoop.metadata.ColumnPath path, org.apache.parquet.schema.PrimitiveType type, org.apache.parquet.hadoop.metadata.CompressionCodecName codec, org.apache.parquet.column.EncodingStats encodingStats, Set<org.apache.parquet.column.Encoding> encodings, org.apache.parquet.column.statistics.Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize, org.apache.parquet.column.statistics.SizeStatistics sizeStatistics) -
get
public static ColumnChunkMetaData get(org.apache.parquet.hadoop.metadata.ColumnPath path, org.apache.parquet.schema.PrimitiveType type, org.apache.parquet.hadoop.metadata.CompressionCodecName codec, org.apache.parquet.column.EncodingStats encodingStats, Set<org.apache.parquet.column.Encoding> encodings, org.apache.parquet.column.statistics.Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize) -
get
public static ColumnChunkMetaData get(org.apache.parquet.hadoop.metadata.ColumnPath path, org.apache.parquet.schema.PrimitiveType type, org.apache.parquet.hadoop.metadata.CompressionCodecName codec, org.apache.parquet.column.EncodingStats encodingStats, Set<org.apache.parquet.column.Encoding> encodings, org.apache.parquet.column.statistics.Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize, org.apache.parquet.column.statistics.SizeStatistics sizeStatistics, org.apache.parquet.column.statistics.geospatial.GeospatialStatistics geospatialStats) - Parameters:
path- the path of this column in the write schematype- primitive type for this columncodec- the compression codec used to compressencodingStats- EncodingStats for the encodings used in this columnencodings- a set of encoding used in this columnstatistics- statistics for the data in this columnfirstDataPage- offset of the first non-dictionary pagedictionaryPageOffset- offset of the dictionary pagevalueCount- number of valuestotalSize- total compressed sizetotalUncompressedSize- uncompressed data sizesizeStatistics- size statistics for the data in this column- Returns:
- a column chunk metadata instance
-
getWithEncryptedMetadata
public static ColumnChunkMetaData getWithEncryptedMetadata(ParquetMetadataConverter parquetMetadataConverter, org.apache.parquet.hadoop.metadata.ColumnPath path, org.apache.parquet.schema.PrimitiveType type, byte[] encryptedMetadata, byte[] columnKeyMetadata, InternalFileDecryptor fileDecryptor, int rowGroupOrdinal, int columnOrdinal, String createdBy) -
setRowGroupOrdinal
public void setRowGroupOrdinal(int rowGroupOrdinal) -
getRowGroupOrdinal
public int getRowGroupOrdinal() -
getStartingPos
public long getStartingPos()- Returns:
- the offset of the first byte in the chunk
-
positiveLongFitsInAnInt
protected static boolean positiveLongFitsInAnInt(long value) checks that a positive long value fits in an int. (reindexed on Integer.MIN_VALUE)- Parameters:
value- a long value- Returns:
- whether it fits
-
decryptIfNeeded
protected void decryptIfNeeded() -
getCodec
public org.apache.parquet.hadoop.metadata.CompressionCodecName getCodec() -
getPath
public org.apache.parquet.hadoop.metadata.ColumnPath getPath()- Returns:
- column identifier
-
getType
Deprecated.will be removed in 2.0.0. UsegetPrimitiveType()instead.- Returns:
- type of the column
-
getPrimitiveType
public org.apache.parquet.schema.PrimitiveType getPrimitiveType()- Returns:
- the primitive type object of the column
-
getFirstDataPageOffset
public abstract long getFirstDataPageOffset()- Returns:
- start of the column data offset
-
getDictionaryPageOffset
public abstract long getDictionaryPageOffset()- Returns:
- the location of the dictionary page if any;
0is returned if there is no dictionary page. CheckhasDictionaryPage()to validate.
-
getValueCount
public abstract long getValueCount()- Returns:
- count of values in this block of the column
-
getTotalUncompressedSize
public abstract long getTotalUncompressedSize()- Returns:
- the totalUncompressedSize
-
getTotalSize
public abstract long getTotalSize()- Returns:
- the totalSize
-
getStatistics
public abstract org.apache.parquet.column.statistics.Statistics getStatistics()- Returns:
- the stats for this column
-
getSizeStatistics
public org.apache.parquet.column.statistics.SizeStatistics getSizeStatistics()Method should be considered private- Returns:
- the size stats for this column
-
getGeospatialStatistics
public org.apache.parquet.column.statistics.geospatial.GeospatialStatistics getGeospatialStatistics()- Returns:
- the geospatial stats for this column
-
getColumnIndexReference
Method should be considered private- Returns:
- the reference to the column index
-
setColumnIndexReference
Method should be considered private- Parameters:
indexReference- the reference to the column index
-
getOffsetIndexReference
Method should be considered private- Returns:
- the reference to the offset index
-
setOffsetIndexReference
Method should be considered private- Parameters:
offsetIndexReference- the reference to the offset index
-
setBloomFilterOffset
public void setBloomFilterOffset(long bloomFilterOffset) Method should be considered private- Parameters:
bloomFilterOffset- the reference to the Bloom filter
-
setBloomFilterLength
public void setBloomFilterLength(int bloomFilterLength) - Parameters:
bloomFilterLength- the reference to the Bloom filter
-
getBloomFilterOffset
public long getBloomFilterOffset()- Returns:
- the offset to the Bloom filter or
-1if there is no bloom filter for this column chunk
-
getBloomFilterLength
public int getBloomFilterLength()- Returns:
- the length to the Bloom filter or
-1if there is no bloom filter length for this column chunk
-
getEncodings
- Returns:
- all the encodings used in this column
-
getEncodingStats
public org.apache.parquet.column.EncodingStats getEncodingStats() -
toString
-
hasDictionaryPage
public boolean hasDictionaryPage() -
isEncrypted
public boolean isEncrypted()Method should be considered private- Returns:
- whether or not this column is encrypted
-