Interface ValuesWriterFactory

  • All Known Implementing Classes:
    DefaultV1ValuesWriterFactory, DefaultV2ValuesWriterFactory, DefaultValuesWriterFactory

    public interface ValuesWriterFactory
    Can be overridden to allow users to manually test different strategies to create ValuesWriters. To do this, the ValuesWriterFactory to be used must be passed to the ParquetProperties.Builder.

    Lifecycle of ValuesWriterFactories is:

    • Initialized while creating a ParquetProperties using the Builder
    • If the factory must read Hadoop config, it needs to implement the Configurable interface. In addition to that, ParquetOutputFormat needs to be updated to pass in the Hadoop config via the setConf() method on the Configurable interface.
    • newValuesWriter is called once per column for every block of data.
    • Method Detail

      • initialize

        void initialize​(ParquetProperties parquetProperties)
        Used to initialize the factory. This method is called before newValuesWriter()
        Parameters:
        parquetProperties - a write configuration
      • newValuesWriter

        ValuesWriter newValuesWriter​(ColumnDescriptor descriptor)
        Creates a ValuesWriter to write values for the given column.
        Parameters:
        descriptor - a column descriptor
        Returns:
        a new values writer for values in the descriptor's column