public abstract static class AvroIO.Sink<ElementT> extends java.lang.Object implements FileIO.Sink<ElementT>
AvroIO.sink(java.lang.Class<ElementT>) and AvroIO.sinkViaGenericRecords(org.apache.avro.Schema, org.apache.beam.sdk.io.AvroIO.RecordFormatter<ElementT>).| Constructor and Description | 
|---|
| Sink() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | flush()Flushes the buffered state (if any) before the channel is closed. | 
| void | open(java.nio.channels.WritableByteChannel channel)Initializes writing to the given channel. | 
| AvroIO.Sink<ElementT> | withCodec(CodecFactory codec)Specifies to use the given  CodecFactoryfor each generated file. | 
| AvroIO.Sink<ElementT> | withMetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)Specifies to put the given metadata into each generated file. | 
| void | write(ElementT element)Appends a single element to the file. | 
public AvroIO.Sink<ElementT> withMetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
public AvroIO.Sink<ElementT> withCodec(CodecFactory codec)
CodecFactory for each generated file. By default, CodecFactory.snappyCodec().public void open(java.nio.channels.WritableByteChannel channel)
          throws java.io.IOException
FileIO.SinkFileIO.Sink
 instance.open in interface FileIO.Sink<ElementT>java.io.IOExceptionpublic void write(ElementT element) throws java.io.IOException
FileIO.Sinkwrite in interface FileIO.Sink<ElementT>java.io.IOExceptionpublic void flush()
           throws java.io.IOException
FileIO.Sinkflush in interface FileIO.Sink<ElementT>java.io.IOException