Package org.apache.beam.sdk.io.thrift
Class ThriftIO.Sink<T extends org.apache.thrift.TBase<?,?>>
java.lang.Object
org.apache.beam.sdk.io.thrift.ThriftIO.Sink<T>
- All Implemented Interfaces:
Serializable
,FileIO.Sink<T>
- Enclosing class:
ThriftIO
public abstract static class ThriftIO.Sink<T extends org.apache.thrift.TBase<?,?>>
extends Object
implements FileIO.Sink<T>
Implementation of
ThriftIO.sink(org.apache.thrift.protocol.TProtocolFactory)
.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
flush()
Flushes the buffered state (if any) before the channel is closed.void
open
(WritableByteChannel channel) Initializes writing to the given channel.void
Appends a single element to the file.
-
Constructor Details
-
Sink
public Sink()
-
-
Method Details
-
open
Description copied from interface:FileIO.Sink
Initializes writing to the given channel. Will be invoked once on a givenFileIO.Sink
instance.- Specified by:
open
in interfaceFileIO.Sink<T extends org.apache.thrift.TBase<?,
?>> - Throws:
IOException
-
write
Description copied from interface:FileIO.Sink
Appends a single element to the file. May be invoked zero or more times.- Specified by:
write
in interfaceFileIO.Sink<T extends org.apache.thrift.TBase<?,
?>> - Throws:
IOException
-
flush
Description copied from interface:FileIO.Sink
Flushes the buffered state (if any) before the channel is closed. Does not need to close the channel. Will be invoked once.- Specified by:
flush
in interfaceFileIO.Sink<T extends org.apache.thrift.TBase<?,
?>> - Throws:
IOException
-