Package org.apache.iceberg.parquet
Class ParquetCodecFactory
java.lang.Object
org.apache.parquet.hadoop.CodecFactory
org.apache.iceberg.parquet.ParquetCodecFactory
- All Implemented Interfaces:
org.apache.parquet.compression.CompressionCodecFactory
public class ParquetCodecFactory
extends org.apache.parquet.hadoop.CodecFactory
This class implements a codec factory that is used when reading from Parquet. It adds a
workaround to cache codecs by name and level, not just by name. This can be removed when this
change is made to Parquet.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.parquet.hadoop.CodecFactory
org.apache.parquet.hadoop.CodecFactory.BytesCompressor, org.apache.parquet.hadoop.CodecFactory.BytesDecompressor
Nested classes/interfaces inherited from interface org.apache.parquet.compression.CompressionCodecFactory
org.apache.parquet.compression.CompressionCodecFactory.BytesInputCompressor, org.apache.parquet.compression.CompressionCodecFactory.BytesInputDecompressor
-
Field Summary
Fields inherited from class org.apache.parquet.hadoop.CodecFactory
CODEC_BY_NAME, configuration, pageSize
-
Constructor Summary
ConstructorDescriptionParquetCodecFactory
(org.apache.hadoop.conf.Configuration configuration, int pageSize) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.hadoop.io.compress.CompressionCodec
getCodec
(org.apache.parquet.hadoop.metadata.CompressionCodecName codecName) This is copied fromCodecFactory
and modified to include the level in the cache key.Methods inherited from class org.apache.parquet.hadoop.CodecFactory
createCompressor, createDecompressor, createDirectCodecFactory, getCompressor, getDecompressor, release
-
Constructor Details
-
ParquetCodecFactory
public ParquetCodecFactory(org.apache.hadoop.conf.Configuration configuration, int pageSize)
-
-
Method Details
-
getCodec
protected org.apache.hadoop.io.compress.CompressionCodec getCodec(org.apache.parquet.hadoop.metadata.CompressionCodecName codecName) This is copied fromCodecFactory
and modified to include the level in the cache key.- Overrides:
getCodec
in classorg.apache.parquet.hadoop.CodecFactory
-