Class AvroIO.Sink<ElementT>

    • Constructor Detail

      • Sink

        public Sink()
    • Method Detail

      • withMetadata

        public AvroIO.Sink<ElementT> withMetadata​(java.util.Map<java.lang.String,​java.lang.Object> metadata)
        Specifies to put the given metadata into each generated file. By default, empty.
      • withCodec

        public AvroIO.Sink<ElementT> withCodec​(org.apache.avro.file.CodecFactory codec)
        Specifies to use the given CodecFactory for each generated file. By default, CodecFactory.snappyCodec().
      • open

        public void open​(java.nio.channels.WritableByteChannel channel)
                  throws java.io.IOException
        Specified by:
        open in interface org.apache.beam.sdk.io.FileIO.Sink<ElementT>
        Throws:
        java.io.IOException
      • write

        public void write​(ElementT element)
                   throws java.io.IOException
        Specified by:
        write in interface org.apache.beam.sdk.io.FileIO.Sink<ElementT>
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface org.apache.beam.sdk.io.FileIO.Sink<ElementT>
        Throws:
        java.io.IOException