Class FanoutDataWriter<T>

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, PartitioningWriter<T,​DataWriteResult>

    public class FanoutDataWriter<T>
    extends java.lang.Object
    A data writer capable of writing to multiple specs and partitions that keeps data writers for each seen spec/partition pair open until this writer is closed.
    • Method Detail

      • write

        public void write​(T row,
                          PartitionSpec spec,
                          StructLike partition)
        Description copied from interface: PartitioningWriter
        Writes a row to the provided spec/partition.
        Specified by:
        write in interface PartitioningWriter<T,​R>
        Parameters:
        row - a data or delete record
        spec - a partition spec
        partition - a partition or null if the spec is unpartitioned
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • result

        public final R result()
        Description copied from interface: PartitioningWriter
        Returns a result that contains information about written DataFiles or DeleteFiles. The result is valid only after the writer is closed.
        Specified by:
        result in interface PartitioningWriter<T,​R>
        Returns:
        the writer result