Class 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

      Constructors 
      Constructor Description
      ParquetCodecFactory​(org.apache.hadoop.conf.Configuration configuration, int pageSize)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.apache.hadoop.io.compress.CompressionCodec getCodec​(org.apache.parquet.hadoop.metadata.CompressionCodecName codecName)
      This is copied from CodecFactory 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ParquetCodecFactory

        public ParquetCodecFactory​(org.apache.hadoop.conf.Configuration configuration,
                                   int pageSize)
    • Method Detail

      • getCodec

        protected org.apache.hadoop.io.compress.CompressionCodec getCodec​(org.apache.parquet.hadoop.metadata.CompressionCodecName codecName)
        This is copied from CodecFactory and modified to include the level in the cache key.
        Overrides:
        getCodec in class org.apache.parquet.hadoop.CodecFactory