public class UnboundedReadFromBoundedSource<T> extends PTransform<PInput,PCollection<T>>
PTransform that converts a BoundedSource as an UnboundedSource.
BoundedSource is read directly without calling BoundedSource.splitIntoBundles(long, org.apache.beam.sdk.options.PipelineOptions),
and element timestamps are propagated. While any elements remain, the watermark is the beginning
of time BoundedWindow.TIMESTAMP_MIN_VALUE, and after all elements have been produced
the watermark goes to the end of time BoundedWindow.TIMESTAMP_MAX_VALUE.
Checkpoints are created by calling BoundedSource.BoundedReader.splitAtFraction(double) on inner
BoundedSource.
Sources that cannot be split are read entirely into memory, so this transform does not work well
with large, unsplittable sources.
This transform is intended to be used by a runner during pipeline translation to convert a Read.Bounded into a Read.Unbounded.
| Modifier and Type | Class and Description |
|---|---|
static class |
UnboundedReadFromBoundedSource.BoundedToUnboundedSourceAdapter<T>
A
BoundedSource to UnboundedSource adapter. |
name| Constructor and Description |
|---|
UnboundedReadFromBoundedSource(BoundedSource<T> source)
Constructs a
PTransform that performs an unbounded read from a BoundedSource. |
| Modifier and Type | Method and Description |
|---|---|
PCollection<T> |
apply(PInput input) |
protected Coder<T> |
getDefaultOutputCoder() |
String |
getKindString() |
void |
populateDisplayData(DisplayData.Builder builder) |
getDefaultOutputCoder, getDefaultOutputCoder, getName, toString, validatepublic UnboundedReadFromBoundedSource(BoundedSource<T> source)
PTransform that performs an unbounded read from a BoundedSource.public PCollection<T> apply(PInput input)
apply in class PTransform<PInput,PCollection<T>>protected Coder<T> getDefaultOutputCoder()
getDefaultOutputCoder in class PTransform<PInput,PCollection<T>>public String getKindString()
getKindString in class PTransform<PInput,PCollection<T>>public void populateDisplayData(DisplayData.Builder builder)
populateDisplayData in interface HasDisplayDatapopulateDisplayData in class PTransform<PInput,PCollection<T>>