Package org.apache.beam.sdk.io.iceberg
Class BundleLifter<T>
java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PCollection<T>,PCollectionTuple>
org.apache.beam.sdk.io.iceberg.BundleLifter<T>
- Type Parameters:
T- The type of elements in the input PCollection.
- All Implemented Interfaces:
Serializable,HasDisplayData
A PTransform that buffers elements and outputs them to one of two TupleTags based on the total
size of the bundle in finish_bundle.
- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints -
Method Summary
Modifier and TypeMethodDescriptionexpand(PCollection<T> input) Override this method to specify how thisPTransformshould be expanded on the givenInputT.static <T> BundleLifter<T> static <T> BundleLifter<T> of(TupleTag<T> smallBatchTag, TupleTag<T> largeBatchTag, int threshold, SerializableFunction<T, Integer> elementSizer) Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
Method Details
-
of
public static <T> BundleLifter<T> of(TupleTag<T> smallBatchTag, TupleTag<T> largeBatchTag, int threshold) -
of
public static <T> BundleLifter<T> of(TupleTag<T> smallBatchTag, TupleTag<T> largeBatchTag, int threshold, SerializableFunction<T, Integer> elementSizer) -
expand
Description copied from class:PTransformOverride this method to specify how thisPTransformshould be expanded on the givenInputT.NOTE: This method should not be called directly. Instead apply the
PTransformshould be applied to theInputTusing theapplymethod.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
expandin classPTransform<PCollection<T>,PCollectionTuple>
-