Package org.apache.beam.sdk.fn.stream
Class DataStreams
java.lang.Object
org.apache.beam.sdk.fn.stream.DataStreams
DataStreams.DataStreamDecoder treats multiple ByteStrings as a single input stream decoding
values with the supplied iterator. outbound(OutputChunkConsumer) treats a single OutputStream as multiple ByteStrings.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn adapter which converts anInputStreamto aPrefetchableIteratorofTvalues using the specifiedCoder.static final classAn adapter which wraps anDataStreams.OutputChunkConsumeras anOutputStream.static interfaceA callback which is invoked whenever theoutbound(org.apache.beam.sdk.fn.stream.DataStreams.OutputChunkConsumer<org.apache.beam.vendor.grpc.v1p69p0.com.google.protobuf.ByteString>)OutputStreambecomes 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 delimitedOutputStreaminto multipleByteStrings.outbound(DataStreams.OutputChunkConsumer<org.apache.beam.vendor.grpc.v1p69p0.com.google.protobuf.ByteString> consumer, int maximumChunkSize) Converts a single element delimitedOutputStreaminto multipleByteStringsusing 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 delimitedOutputStreaminto multipleByteStrings.Note that users must call
DataStreams.ElementDelimitedOutputStream.delimitElement()after each element.Note that this
OutputStreamfollows 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 delimitedOutputStreaminto multipleByteStringsusing the specified maximum chunk size.Note that users must call
DataStreams.ElementDelimitedOutputStream.delimitElement()after each element.Note that this
OutputStreamfollows the Beam Fn API specification for forcing values that encode producing zero bytes to produce exactly one byte.
-