Class ParquetMetadataConverter
java.lang.Object
org.apache.parquet.format.converter.ParquetMetadataConverter
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final ParquetMetadataConverter.MetadataFilterstatic final StringConfiguration property to control the Thrift max message size when reading Parquet metadata.static final ParquetMetadataConverter.MetadataFilter -
Constructor Summary
ConstructorsConstructorDescriptionParquetMetadataConverter(int statisticsTruncateLength) ParquetMetadataConverter(org.apache.hadoop.conf.Configuration conf) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionbuildColumnChunkMetaData(org.apache.parquet.format.ColumnMetaData metaData, org.apache.parquet.hadoop.metadata.ColumnPath columnPath, org.apache.parquet.schema.PrimitiveType type, String createdBy) org.apache.parquet.column.EncodingStatsconvertEncodingStats(List<org.apache.parquet.format.PageEncodingStats> stats) List<org.apache.parquet.format.PageEncodingStats>convertEncodingStats(org.apache.parquet.column.EncodingStats stats) static org.apache.parquet.internal.column.columnindex.ColumnIndexfromParquetColumnIndex(org.apache.parquet.schema.PrimitiveType type, org.apache.parquet.format.ColumnIndex parquetColumnIndex) static org.apache.parquet.format.EdgeInterpolationAlgorithmfromParquetEdgeInterpolationAlgorithm(org.apache.parquet.column.schema.EdgeInterpolationAlgorithm parquetAlgo) Convert Parquet Algorithm enum to Thrift Algorithm enumfromParquetMetadata(org.apache.parquet.format.FileMetaData parquetMetadata) fromParquetMetadata(org.apache.parquet.format.FileMetaData parquetMetadata, InternalFileDecryptor fileDecryptor, boolean encryptedFooter) fromParquetMetadata(org.apache.parquet.format.FileMetaData parquetMetadata, InternalFileDecryptor fileDecryptor, boolean encryptedFooter, Map<org.apache.parquet.format.RowGroup, Long> rowGroupToRowIndexOffsetMap) static org.apache.parquet.internal.column.columnindex.OffsetIndexfromParquetOffsetIndex(org.apache.parquet.format.OffsetIndex parquetOffsetIndex) static org.apache.parquet.column.statistics.SizeStatisticsfromParquetSizeStatistics(org.apache.parquet.format.SizeStatistics statistics, org.apache.parquet.schema.PrimitiveType type) org.apache.parquet.column.statistics.StatisticsfromParquetStatistics(String createdBy, org.apache.parquet.format.Statistics statistics, org.apache.parquet.schema.PrimitiveType type) static org.apache.parquet.column.statistics.StatisticsfromParquetStatistics(String createdBy, org.apache.parquet.format.Statistics statistics, org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName type) Deprecated.will be removed in 2.0.0.static org.apache.parquet.column.statistics.StatisticsfromParquetStatistics(org.apache.parquet.format.Statistics statistics, org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName type) Deprecated.will be removed in 2.0.0.org.apache.parquet.format.EncodinggetEncoding(org.apache.parquet.column.Encoding encoding) org.apache.parquet.column.EncodinggetEncoding(org.apache.parquet.format.Encoding encoding) org.apache.parquet.schema.PrimitiveType.PrimitiveTypeNamegetPrimitive(org.apache.parquet.format.Type type) offsets(long... offsets) range(long startOffset, long endOffset) [ startOffset, endOffset )Deprecated.readParquetMetadata(InputStream fromInputStream, ParquetMetadataConverter.MetadataFilter filter, InternalFileDecryptor fileDecryptor, boolean encryptedFooter, int combinedFooterLength) static org.apache.parquet.format.BloomFilterHeadertoBloomFilterHeader(org.apache.parquet.column.values.bloomfilter.BloomFilter bloomFilter) static org.apache.parquet.format.ColumnIndextoParquetColumnIndex(org.apache.parquet.schema.PrimitiveType type, org.apache.parquet.internal.column.columnindex.ColumnIndex columnIndex) static org.apache.parquet.column.schema.EdgeInterpolationAlgorithmtoParquetEdgeInterpolationAlgorithm(org.apache.parquet.format.EdgeInterpolationAlgorithm thriftAlgo) Convert Thrift Algorithm enum to Parquet Algorithm enumorg.apache.parquet.format.FileMetaDatatoParquetMetadata(int currentVersion, ParquetMetadata parquetMetadata) org.apache.parquet.format.FileMetaDatatoParquetMetadata(int currentVersion, ParquetMetadata parquetMetadata, InternalFileEncryptor fileEncryptor) static org.apache.parquet.format.OffsetIndextoParquetOffsetIndex(org.apache.parquet.internal.column.columnindex.OffsetIndex offsetIndex) static org.apache.parquet.format.SizeStatisticstoParquetSizeStatistics(org.apache.parquet.column.statistics.SizeStatistics stats) static org.apache.parquet.format.StatisticstoParquetStatistics(org.apache.parquet.column.statistics.Statistics stats) static org.apache.parquet.format.StatisticstoParquetStatistics(org.apache.parquet.column.statistics.Statistics stats, int truncateLength) voidwriteDataPageHeader(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding rlEncoding, org.apache.parquet.column.Encoding dlEncoding, org.apache.parquet.column.Encoding valuesEncoding, OutputStream to) Deprecated.voidwriteDataPageHeader(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.statistics.Statistics statistics, org.apache.parquet.column.Encoding rlEncoding, org.apache.parquet.column.Encoding dlEncoding, org.apache.parquet.column.Encoding valuesEncoding, OutputStream to) Deprecated.voidwriteDataPageV1Header(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding rlEncoding, org.apache.parquet.column.Encoding dlEncoding, org.apache.parquet.column.Encoding valuesEncoding, int crc, OutputStream to) voidwriteDataPageV1Header(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding rlEncoding, org.apache.parquet.column.Encoding dlEncoding, org.apache.parquet.column.Encoding valuesEncoding, int crc, OutputStream to, org.apache.parquet.format.BlockCipher.Encryptor blockEncryptor, byte[] pageHeaderAAD) voidwriteDataPageV1Header(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding rlEncoding, org.apache.parquet.column.Encoding dlEncoding, org.apache.parquet.column.Encoding valuesEncoding, OutputStream to) voidwriteDataPageV1Header(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding rlEncoding, org.apache.parquet.column.Encoding dlEncoding, org.apache.parquet.column.Encoding valuesEncoding, OutputStream to, org.apache.parquet.format.BlockCipher.Encryptor blockEncryptor, byte[] pageHeaderAAD) voidwriteDataPageV2Header(int uncompressedSize, int compressedSize, int valueCount, int nullCount, int rowCount, org.apache.parquet.column.Encoding dataEncoding, int rlByteLength, int dlByteLength, boolean compressed, int crc, OutputStream to, org.apache.parquet.format.BlockCipher.Encryptor blockEncryptor, byte[] pageHeaderAAD) voidwriteDataPageV2Header(int uncompressedSize, int compressedSize, int valueCount, int nullCount, int rowCount, org.apache.parquet.column.Encoding dataEncoding, int rlByteLength, int dlByteLength, boolean compressed, OutputStream to) voidwriteDataPageV2Header(int uncompressedSize, int compressedSize, int valueCount, int nullCount, int rowCount, org.apache.parquet.column.Encoding dataEncoding, int rlByteLength, int dlByteLength, boolean compressed, OutputStream to, org.apache.parquet.format.BlockCipher.Encryptor blockEncryptor, byte[] pageHeaderAAD) voidwriteDataPageV2Header(int uncompressedSize, int compressedSize, int valueCount, int nullCount, int rowCount, org.apache.parquet.column.Encoding dataEncoding, int rlByteLength, int dlByteLength, int crc, OutputStream to, org.apache.parquet.format.BlockCipher.Encryptor blockEncryptor, byte[] pageHeaderAAD) Deprecated.will be removed in 2.0.0.voidwriteDataPageV2Header(int uncompressedSize, int compressedSize, int valueCount, int nullCount, int rowCount, org.apache.parquet.column.Encoding dataEncoding, int rlByteLength, int dlByteLength, OutputStream to) Deprecated.will be removed in 2.0.0.voidwriteDataPageV2Header(int uncompressedSize, int compressedSize, int valueCount, int nullCount, int rowCount, org.apache.parquet.column.Encoding dataEncoding, int rlByteLength, int dlByteLength, OutputStream to, org.apache.parquet.format.BlockCipher.Encryptor blockEncryptor, byte[] pageHeaderAAD) Deprecated.will be removed in 2.0.0.voidwriteDataPageV2Header(int uncompressedSize, int compressedSize, int valueCount, int nullCount, int rowCount, org.apache.parquet.column.statistics.Statistics statistics, org.apache.parquet.column.Encoding dataEncoding, int rlByteLength, int dlByteLength, OutputStream to) Deprecated.voidwriteDictionaryPageHeader(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding valuesEncoding, int crc, OutputStream to) voidwriteDictionaryPageHeader(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding valuesEncoding, int crc, OutputStream to, org.apache.parquet.format.BlockCipher.Encryptor blockEncryptor, byte[] pageHeaderAAD) voidwriteDictionaryPageHeader(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding valuesEncoding, OutputStream to) voidwriteDictionaryPageHeader(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding valuesEncoding, OutputStream to, org.apache.parquet.format.BlockCipher.Encryptor blockEncryptor, byte[] pageHeaderAAD)
-
Field Details
-
NO_FILTER
-
SKIP_ROW_GROUPS
-
MAX_STATS_SIZE
public static final long MAX_STATS_SIZE- See Also:
-
PARQUET_THRIFT_STRING_SIZE_LIMIT
Configuration property to control the Thrift max message size when reading Parquet metadata. This is useful for files with very large metadata Default value is 100 MB.- See Also:
-
-
Constructor Details
-
ParquetMetadataConverter
public ParquetMetadataConverter() -
ParquetMetadataConverter
public ParquetMetadataConverter(int statisticsTruncateLength) -
ParquetMetadataConverter
Deprecated.will be removed in 2.0.0; useParquetMetadataConverter(ParquetReadOptions)- Parameters:
conf- a configuration
-
ParquetMetadataConverter
-
-
Method Details
-
toParquetMetadata
public org.apache.parquet.format.FileMetaData toParquetMetadata(int currentVersion, ParquetMetadata parquetMetadata) -
toParquetMetadata
public org.apache.parquet.format.FileMetaData toParquetMetadata(int currentVersion, ParquetMetadata parquetMetadata, InternalFileEncryptor fileEncryptor) -
getEncoding
public org.apache.parquet.column.Encoding getEncoding(org.apache.parquet.format.Encoding encoding) -
getEncoding
public org.apache.parquet.format.Encoding getEncoding(org.apache.parquet.column.Encoding encoding) -
convertEncodingStats
public org.apache.parquet.column.EncodingStats convertEncodingStats(List<org.apache.parquet.format.PageEncodingStats> stats) -
convertEncodingStats
public List<org.apache.parquet.format.PageEncodingStats> convertEncodingStats(org.apache.parquet.column.EncodingStats stats) -
toParquetStatistics
public static org.apache.parquet.format.Statistics toParquetStatistics(org.apache.parquet.column.statistics.Statistics stats) -
toParquetStatistics
public static org.apache.parquet.format.Statistics toParquetStatistics(org.apache.parquet.column.statistics.Statistics stats, int truncateLength) -
fromParquetStatistics
@Deprecated public static org.apache.parquet.column.statistics.Statistics fromParquetStatistics(org.apache.parquet.format.Statistics statistics, org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName type) Deprecated.will be removed in 2.0.0.- Parameters:
statistics- parquet format statisticstype- a primitive type name- Returns:
- the statistics
-
fromParquetStatistics
@Deprecated public static org.apache.parquet.column.statistics.Statistics fromParquetStatistics(String createdBy, org.apache.parquet.format.Statistics statistics, org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName type) Deprecated.will be removed in 2.0.0.- Parameters:
createdBy- the created-by string from the filestatistics- parquet format statisticstype- a primitive type name- Returns:
- the statistics
-
fromParquetStatistics
public org.apache.parquet.column.statistics.Statistics fromParquetStatistics(String createdBy, org.apache.parquet.format.Statistics statistics, org.apache.parquet.schema.PrimitiveType type) -
getPrimitive
public org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName getPrimitive(org.apache.parquet.format.Type type) -
range
[ startOffset, endOffset )- Parameters:
startOffset- a start offset (inclusive)endOffset- an end offset (exclusive)- Returns:
- a range filter from the offsets
-
offsets
-
readParquetMetadata
Deprecated.- Throws:
IOException
-
readParquetMetadata
public ParquetMetadata readParquetMetadata(InputStream from, ParquetMetadataConverter.MetadataFilter filter) throws IOException - Throws:
IOException
-
readParquetMetadata
public ParquetMetadata readParquetMetadata(InputStream fromInputStream, ParquetMetadataConverter.MetadataFilter filter, InternalFileDecryptor fileDecryptor, boolean encryptedFooter, int combinedFooterLength) throws IOException - Throws:
IOException
-
buildColumnChunkMetaData
public ColumnChunkMetaData buildColumnChunkMetaData(org.apache.parquet.format.ColumnMetaData metaData, org.apache.parquet.hadoop.metadata.ColumnPath columnPath, org.apache.parquet.schema.PrimitiveType type, String createdBy) -
fromParquetMetadata
public ParquetMetadata fromParquetMetadata(org.apache.parquet.format.FileMetaData parquetMetadata) throws IOException - Throws:
IOException
-
fromParquetMetadata
public ParquetMetadata fromParquetMetadata(org.apache.parquet.format.FileMetaData parquetMetadata, InternalFileDecryptor fileDecryptor, boolean encryptedFooter) throws IOException - Throws:
IOException
-
fromParquetMetadata
public ParquetMetadata fromParquetMetadata(org.apache.parquet.format.FileMetaData parquetMetadata, InternalFileDecryptor fileDecryptor, boolean encryptedFooter, Map<org.apache.parquet.format.RowGroup, Long> rowGroupToRowIndexOffsetMap) throws IOException- Throws:
IOException
-
writeDataPageHeader
@Deprecated public void writeDataPageHeader(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding rlEncoding, org.apache.parquet.column.Encoding dlEncoding, org.apache.parquet.column.Encoding valuesEncoding, OutputStream to) throws IOException Deprecated.- Throws:
IOException
-
writeDataPageHeader
@Deprecated public void writeDataPageHeader(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.statistics.Statistics statistics, org.apache.parquet.column.Encoding rlEncoding, org.apache.parquet.column.Encoding dlEncoding, org.apache.parquet.column.Encoding valuesEncoding, OutputStream to) throws IOException Deprecated.- Throws:
IOException
-
writeDataPageV2Header
@Deprecated public void writeDataPageV2Header(int uncompressedSize, int compressedSize, int valueCount, int nullCount, int rowCount, org.apache.parquet.column.statistics.Statistics statistics, org.apache.parquet.column.Encoding dataEncoding, int rlByteLength, int dlByteLength, OutputStream to) throws IOException Deprecated.- Throws:
IOException
-
writeDataPageV1Header
public void writeDataPageV1Header(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding rlEncoding, org.apache.parquet.column.Encoding dlEncoding, org.apache.parquet.column.Encoding valuesEncoding, OutputStream to) throws IOException - Throws:
IOException
-
writeDataPageV1Header
public void writeDataPageV1Header(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding rlEncoding, org.apache.parquet.column.Encoding dlEncoding, org.apache.parquet.column.Encoding valuesEncoding, OutputStream to, org.apache.parquet.format.BlockCipher.Encryptor blockEncryptor, byte[] pageHeaderAAD) throws IOException - Throws:
IOException
-
writeDataPageV1Header
public void writeDataPageV1Header(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding rlEncoding, org.apache.parquet.column.Encoding dlEncoding, org.apache.parquet.column.Encoding valuesEncoding, int crc, OutputStream to) throws IOException - Throws:
IOException
-
writeDataPageV1Header
public void writeDataPageV1Header(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding rlEncoding, org.apache.parquet.column.Encoding dlEncoding, org.apache.parquet.column.Encoding valuesEncoding, int crc, OutputStream to, org.apache.parquet.format.BlockCipher.Encryptor blockEncryptor, byte[] pageHeaderAAD) throws IOException - Throws:
IOException
-
writeDataPageV2Header
@Deprecated public void writeDataPageV2Header(int uncompressedSize, int compressedSize, int valueCount, int nullCount, int rowCount, org.apache.parquet.column.Encoding dataEncoding, int rlByteLength, int dlByteLength, OutputStream to) throws IOException Deprecated.will be removed in 2.0.0. UsewriteDataPageV2Header(int, int, int, int, int, org.apache.parquet.column.Encoding, int, int, boolean, OutputStream)instead- Throws:
IOException
-
writeDataPageV2Header
@Deprecated public void writeDataPageV2Header(int uncompressedSize, int compressedSize, int valueCount, int nullCount, int rowCount, org.apache.parquet.column.Encoding dataEncoding, int rlByteLength, int dlByteLength, OutputStream to, org.apache.parquet.format.BlockCipher.Encryptor blockEncryptor, byte[] pageHeaderAAD) throws IOException Deprecated.will be removed in 2.0.0. UsewriteDataPageV2Header(int, int, int, int, int, org.apache.parquet.column.Encoding, int, int, boolean, OutputStream, BlockCipher.Encryptor, byte[])instead- Throws:
IOException
-
writeDataPageV2Header
@Deprecated public void writeDataPageV2Header(int uncompressedSize, int compressedSize, int valueCount, int nullCount, int rowCount, org.apache.parquet.column.Encoding dataEncoding, int rlByteLength, int dlByteLength, int crc, OutputStream to, org.apache.parquet.format.BlockCipher.Encryptor blockEncryptor, byte[] pageHeaderAAD) throws IOException Deprecated.will be removed in 2.0.0. UsewriteDataPageV2Header(int, int, int, int, int, org.apache.parquet.column.Encoding, int, int, boolean, int, OutputStream, BlockCipher.Encryptor, byte[])instead- Throws:
IOException
-
writeDataPageV2Header
public void writeDataPageV2Header(int uncompressedSize, int compressedSize, int valueCount, int nullCount, int rowCount, org.apache.parquet.column.Encoding dataEncoding, int rlByteLength, int dlByteLength, boolean compressed, OutputStream to) throws IOException - Throws:
IOException
-
writeDataPageV2Header
public void writeDataPageV2Header(int uncompressedSize, int compressedSize, int valueCount, int nullCount, int rowCount, org.apache.parquet.column.Encoding dataEncoding, int rlByteLength, int dlByteLength, boolean compressed, OutputStream to, org.apache.parquet.format.BlockCipher.Encryptor blockEncryptor, byte[] pageHeaderAAD) throws IOException - Throws:
IOException
-
writeDataPageV2Header
public void writeDataPageV2Header(int uncompressedSize, int compressedSize, int valueCount, int nullCount, int rowCount, org.apache.parquet.column.Encoding dataEncoding, int rlByteLength, int dlByteLength, boolean compressed, int crc, OutputStream to, org.apache.parquet.format.BlockCipher.Encryptor blockEncryptor, byte[] pageHeaderAAD) throws IOException - Throws:
IOException
-
writeDictionaryPageHeader
public void writeDictionaryPageHeader(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding valuesEncoding, OutputStream to) throws IOException - Throws:
IOException
-
writeDictionaryPageHeader
public void writeDictionaryPageHeader(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding valuesEncoding, OutputStream to, org.apache.parquet.format.BlockCipher.Encryptor blockEncryptor, byte[] pageHeaderAAD) throws IOException - Throws:
IOException
-
writeDictionaryPageHeader
public void writeDictionaryPageHeader(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding valuesEncoding, int crc, OutputStream to) throws IOException - Throws:
IOException
-
writeDictionaryPageHeader
public void writeDictionaryPageHeader(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding valuesEncoding, int crc, OutputStream to, org.apache.parquet.format.BlockCipher.Encryptor blockEncryptor, byte[] pageHeaderAAD) throws IOException - Throws:
IOException
-
toParquetColumnIndex
public static org.apache.parquet.format.ColumnIndex toParquetColumnIndex(org.apache.parquet.schema.PrimitiveType type, org.apache.parquet.internal.column.columnindex.ColumnIndex columnIndex) -
fromParquetColumnIndex
public static org.apache.parquet.internal.column.columnindex.ColumnIndex fromParquetColumnIndex(org.apache.parquet.schema.PrimitiveType type, org.apache.parquet.format.ColumnIndex parquetColumnIndex) -
toParquetOffsetIndex
public static org.apache.parquet.format.OffsetIndex toParquetOffsetIndex(org.apache.parquet.internal.column.columnindex.OffsetIndex offsetIndex) -
fromParquetOffsetIndex
public static org.apache.parquet.internal.column.columnindex.OffsetIndex fromParquetOffsetIndex(org.apache.parquet.format.OffsetIndex parquetOffsetIndex) -
toBloomFilterHeader
public static org.apache.parquet.format.BloomFilterHeader toBloomFilterHeader(org.apache.parquet.column.values.bloomfilter.BloomFilter bloomFilter) -
fromParquetSizeStatistics
public static org.apache.parquet.column.statistics.SizeStatistics fromParquetSizeStatistics(org.apache.parquet.format.SizeStatistics statistics, org.apache.parquet.schema.PrimitiveType type) -
toParquetSizeStatistics
public static org.apache.parquet.format.SizeStatistics toParquetSizeStatistics(org.apache.parquet.column.statistics.SizeStatistics stats) -
fromParquetEdgeInterpolationAlgorithm
public static org.apache.parquet.format.EdgeInterpolationAlgorithm fromParquetEdgeInterpolationAlgorithm(org.apache.parquet.column.schema.EdgeInterpolationAlgorithm parquetAlgo) Convert Parquet Algorithm enum to Thrift Algorithm enum -
toParquetEdgeInterpolationAlgorithm
public static org.apache.parquet.column.schema.EdgeInterpolationAlgorithm toParquetEdgeInterpolationAlgorithm(org.apache.parquet.format.EdgeInterpolationAlgorithm thriftAlgo) Convert Thrift Algorithm enum to Parquet Algorithm enum
-
ParquetMetadataConverter(ParquetReadOptions)