Interface ValuesWriterFactory
-
- All Known Implementing Classes:
DefaultV1ValuesWriterFactory,DefaultV2ValuesWriterFactory,DefaultValuesWriterFactory
public interface ValuesWriterFactoryCan 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 theParquetProperties.Builder.Lifecycle of ValuesWriterFactories is:
- Initialized while creating a
ParquetPropertiesusing 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidinitialize(ParquetProperties parquetProperties)Used to initialize the factory.ValuesWriternewValuesWriter(ColumnDescriptor descriptor)Creates a ValuesWriter to write values for the given column.
-
-
-
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
-
-