Class DelegatingWriteSupport<T>

java.lang.Object
org.apache.parquet.hadoop.api.WriteSupport<T>
org.apache.parquet.hadoop.api.DelegatingWriteSupport<T>
Type Parameters:
T - the Java class of objects written with this WriteSupport

public class DelegatingWriteSupport<T> extends WriteSupport<T>
Helps composing write supports
  • Constructor Details

    • DelegatingWriteSupport

      public DelegatingWriteSupport(WriteSupport<T> delegate)
  • Method Details

    • init

      public WriteSupport.WriteContext init(org.apache.hadoop.conf.Configuration configuration)
      Description copied from class: WriteSupport
      called first in the task
      Specified by:
      init in class WriteSupport<T>
      Parameters:
      configuration - the job's configuration
      Returns:
      the information needed to write the file
    • init

      public WriteSupport.WriteContext init(org.apache.parquet.conf.ParquetConfiguration configuration)
      Description copied from class: WriteSupport
      called first in the task
      Overrides:
      init in class WriteSupport<T>
      Parameters:
      configuration - the job's configuration
      Returns:
      the information needed to write the file
    • prepareForWrite

      public void prepareForWrite(org.apache.parquet.io.api.RecordConsumer recordConsumer)
      Description copied from class: WriteSupport
      This will be called once per row group
      Specified by:
      prepareForWrite in class WriteSupport<T>
      Parameters:
      recordConsumer - the recordConsumer to write to
    • write

      public void write(T record)
      Description copied from class: WriteSupport
      called once per record
      Specified by:
      write in class WriteSupport<T>
      Parameters:
      record - one record to write to the previously provided record consumer
    • getName

      public String getName()
      Description copied from class: WriteSupport
      Called to get a name to identify the WriteSupport object model. If not null, this is added to the file footer metadata.

      Defining this method will be required in a future API version.

      Overrides:
      getName in class WriteSupport<T>
      Returns:
      a String name for file metadata.
    • finalizeWrite

      public WriteSupport.FinalizedWriteContext finalizeWrite()
      Description copied from class: WriteSupport
      called once in the end after the last record was written
      Overrides:
      finalizeWrite in class WriteSupport<T>
      Returns:
      information to be added in the file
    • toString

      public String toString()
      Overrides:
      toString in class Object