Class WriteSupport<T>

    • Constructor Detail

      • WriteSupport

        public WriteSupport()
    • Method Detail

      • init

        public abstract WriteSupport.WriteContext init​(org.apache.hadoop.conf.Configuration configuration)
        called first in the task
        Parameters:
        configuration - the job's configuration
        Returns:
        the information needed to write the file
      • prepareForWrite

        public abstract void prepareForWrite​(RecordConsumer recordConsumer)
        This will be called once per row group
        Parameters:
        recordConsumer - the recordConsumer to write to
      • write

        public abstract void write​(T record)
        called once per record
        Parameters:
        record - one record to write to the previously provided record consumer
      • getName

        public String getName()
        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.

        Returns:
        a String name for file metadata.
      • finalizeWrite

        public WriteSupport.FinalizedWriteContext finalizeWrite()
        called once in the end after the last record was written
        Returns:
        information to be added in the file