Class ColumnChunkMetaData
- java.lang.Object
-
- org.apache.parquet.hadoop.metadata.ColumnChunkMetaData
-
public abstract class ColumnChunkMetaData extends Object
Column meta data for a block stored in the file footer and passed in the InputSplit
-
-
Field Summary
Fields Modifier and Type Field Description protected introwGroupOrdinal
-
Constructor Summary
Constructors Modifier Constructor Description protectedColumnChunkMetaData(EncodingStats encodingStats, ColumnChunkProperties columnChunkProperties)protectedColumnChunkMetaData(ColumnChunkProperties columnChunkProperties)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voiddecryptIfNeeded()static ColumnChunkMetaDataget(ColumnPath path, PrimitiveType.PrimitiveTypeName type, CompressionCodecName codec, Set<Encoding> encodings, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize)Deprecated.static ColumnChunkMetaDataget(ColumnPath path, PrimitiveType.PrimitiveTypeName type, CompressionCodecName codec, Set<Encoding> encodings, Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize)Deprecated.static ColumnChunkMetaDataget(ColumnPath path, PrimitiveType.PrimitiveTypeName type, CompressionCodecName codec, EncodingStats encodingStats, Set<Encoding> encodings, Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize)Deprecated.will be removed in 2.0.0.static ColumnChunkMetaDataget(ColumnPath path, PrimitiveType type, CompressionCodecName codec, EncodingStats encodingStats, Set<Encoding> encodings, Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize)static ColumnChunkMetaDataget(ColumnPath path, PrimitiveType type, CompressionCodecName codec, EncodingStats encodingStats, Set<Encoding> encodings, Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize, SizeStatistics sizeStatistics)static ColumnChunkMetaDataget(ColumnPath path, PrimitiveType type, CompressionCodecName codec, EncodingStats encodingStats, Set<Encoding> encodings, Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize, SizeStatistics sizeStatistics, GeospatialStatistics geospatialStats)intgetBloomFilterLength()longgetBloomFilterOffset()CompressionCodecNamegetCodec()IndexReferencegetColumnIndexReference()Method should be considered privateabstract longgetDictionaryPageOffset()Set<Encoding>getEncodings()EncodingStatsgetEncodingStats()abstract longgetFirstDataPageOffset()GeospatialStatisticsgetGeospatialStatistics()IndexReferencegetOffsetIndexReference()Method should be considered privateColumnPathgetPath()PrimitiveTypegetPrimitiveType()intgetRowGroupOrdinal()SizeStatisticsgetSizeStatistics()Method should be considered privatelonggetStartingPos()abstract StatisticsgetStatistics()abstract longgetTotalSize()abstract longgetTotalUncompressedSize()PrimitiveType.PrimitiveTypeNamegetType()Deprecated.will be removed in 2.0.0.abstract longgetValueCount()static ColumnChunkMetaDatagetWithEncryptedMetadata(ParquetMetadataConverter parquetMetadataConverter, ColumnPath path, PrimitiveType type, byte[] encryptedMetadata, byte[] columnKeyMetadata, InternalFileDecryptor fileDecryptor, int rowGroupOrdinal, int columnOrdinal, String createdBy)booleanhasDictionaryPage()booleanisEncrypted()Method 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)StringtoString()
-
-
-
Constructor Detail
-
ColumnChunkMetaData
protected ColumnChunkMetaData(ColumnChunkProperties columnChunkProperties)
-
ColumnChunkMetaData
protected ColumnChunkMetaData(EncodingStats encodingStats, ColumnChunkProperties columnChunkProperties)
-
-
Method Detail
-
get
@Deprecated public static ColumnChunkMetaData get(ColumnPath path, PrimitiveType.PrimitiveTypeName type, CompressionCodecName codec, Set<Encoding> encodings, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize)
Deprecated.
-
get
@Deprecated public static ColumnChunkMetaData get(ColumnPath path, PrimitiveType.PrimitiveTypeName type, CompressionCodecName codec, Set<Encoding> encodings, Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize)
Deprecated.
-
get
@Deprecated public static ColumnChunkMetaData get(ColumnPath path, PrimitiveType.PrimitiveTypeName type, CompressionCodecName codec, EncodingStats encodingStats, Set<Encoding> encodings, 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(ColumnPath path, PrimitiveType type, CompressionCodecName codec, EncodingStats encodingStats, Set<Encoding> encodings, Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize, SizeStatistics sizeStatistics)
-
get
public static ColumnChunkMetaData get(ColumnPath path, PrimitiveType type, CompressionCodecName codec, EncodingStats encodingStats, Set<Encoding> encodings, Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize)
-
get
public static ColumnChunkMetaData get(ColumnPath path, PrimitiveType type, CompressionCodecName codec, EncodingStats encodingStats, Set<Encoding> encodings, Statistics statistics, long firstDataPage, long dictionaryPageOffset, long valueCount, long totalSize, long totalUncompressedSize, SizeStatistics sizeStatistics, 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, ColumnPath path, 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 CompressionCodecName getCodec()
-
getPath
public ColumnPath getPath()
- Returns:
- column identifier
-
getType
@Deprecated public PrimitiveType.PrimitiveTypeName getType()
Deprecated.will be removed in 2.0.0. UsegetPrimitiveType()instead.- Returns:
- type of the column
-
getPrimitiveType
public 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 Statistics getStatistics()
- Returns:
- the stats for this column
-
getSizeStatistics
public SizeStatistics getSizeStatistics()
Method should be considered private- Returns:
- the size stats for this column
-
getGeospatialStatistics
public GeospatialStatistics getGeospatialStatistics()
- Returns:
- the geospatial stats for this column
-
getColumnIndexReference
public IndexReference getColumnIndexReference()
Method should be considered private- Returns:
- the reference to the column index
-
setColumnIndexReference
public void setColumnIndexReference(IndexReference indexReference)
Method should be considered private- Parameters:
indexReference- the reference to the column index
-
getOffsetIndexReference
public IndexReference getOffsetIndexReference()
Method should be considered private- Returns:
- the reference to the offset index
-
setOffsetIndexReference
public void setOffsetIndexReference(IndexReference offsetIndexReference)
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
-
getEncodingStats
public EncodingStats getEncodingStats()
-
hasDictionaryPage
public boolean hasDictionaryPage()
-
isEncrypted
public boolean isEncrypted()
Method should be considered private- Returns:
- whether or not this column is encrypted
-
-