Package org.apache.beam.sdk.fn.stream
Class DataStreams
java.lang.Object
org.apache.beam.sdk.fn.stream.DataStreams
DataStreams.DataStreamDecoder
treats multiple ByteString
s as a single input stream decoding
values with the supplied iterator. outbound(OutputChunkConsumer)
treats a single OutputStream
as multiple ByteString
s.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
An adapter which converts anInputStream
to aPrefetchableIterator
ofT
values using the specifiedCoder
.static final class
An adapter which wraps anDataStreams.OutputChunkConsumer
as anOutputStream
.static interface
A callback which is invoked whenever theoutbound(org.apache.beam.sdk.fn.stream.DataStreams.OutputChunkConsumer<org.apache.beam.vendor.grpc.v1p69p0.com.google.protobuf.ByteString>)
OutputStream
becomes full. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionoutbound
(DataStreams.OutputChunkConsumer<org.apache.beam.vendor.grpc.v1p69p0.com.google.protobuf.ByteString> consumer) Converts a single element delimitedOutputStream
into multipleByteStrings
.outbound
(DataStreams.OutputChunkConsumer<org.apache.beam.vendor.grpc.v1p69p0.com.google.protobuf.ByteString> consumer, int maximumChunkSize) Converts a single element delimitedOutputStream
into multipleByteStrings
using the specified maximum chunk size.
-
Field Details
-
DEFAULT_OUTBOUND_BUFFER_LIMIT_BYTES
public static final int DEFAULT_OUTBOUND_BUFFER_LIMIT_BYTES- See Also:
-
-
Constructor Details
-
DataStreams
public DataStreams()
-
-
Method Details
-
outbound
public static DataStreams.ElementDelimitedOutputStream outbound(DataStreams.OutputChunkConsumer<org.apache.beam.vendor.grpc.v1p69p0.com.google.protobuf.ByteString> consumer) Converts a single element delimitedOutputStream
into multipleByteStrings
.Note that users must call
DataStreams.ElementDelimitedOutputStream.delimitElement()
after each element.Note that this
OutputStream
follows the Beam Fn API specification for forcing values that encode producing zero bytes to produce exactly one byte. -
outbound
public static DataStreams.ElementDelimitedOutputStream outbound(DataStreams.OutputChunkConsumer<org.apache.beam.vendor.grpc.v1p69p0.com.google.protobuf.ByteString> consumer, int maximumChunkSize) Converts a single element delimitedOutputStream
into multipleByteStrings
using the specified maximum chunk size.Note that users must call
DataStreams.ElementDelimitedOutputStream.delimitElement()
after each element.Note that this
OutputStream
follows the Beam Fn API specification for forcing values that encode producing zero bytes to produce exactly one byte.
-