T - Type of records read by the source.public abstract class BoundedSource<T> extends Source<T>
Source that reads a bounded amount of input and, because of that, supports
some additional operations, e.g. size estimation, and its reader supports progress estimation.| Modifier and Type | Class and Description |
|---|---|
static class |
BoundedSource.AbstractBoundedReader<T>
A base class implementing some optional methods of
BoundedSource.BoundedReader in a default way:
Progress estimation (BoundedSource.AbstractBoundedReader.getFractionConsumed()) is not supported. |
static interface |
BoundedSource.BoundedReader<T>
A
Reader that reads a bounded amount of input and supports some additional
operations, such as progress estimation and dynamic work rebalancing. |
Source.AbstractReader<T>, Source.Reader<T>| Constructor and Description |
|---|
BoundedSource() |
| Modifier and Type | Method and Description |
|---|---|
BoundedSource.BoundedReader<T> |
createReader(PipelineOptions options,
com.google.cloud.dataflow.sdk.util.ExecutionContext executionContext)
Creates a reader for this source.
|
abstract long |
getEstimatedSizeBytes(PipelineOptions options)
An estimate of the total size (in bytes) of the data that would be read from this source.
|
abstract boolean |
producesSortedKeys(PipelineOptions options)
Whether this source is known to produce key/value pairs with the (encoded) keys in
lexicographically sorted order.
|
getDefaultOutputCoder, splitIntoBundles, validatepublic abstract long getEstimatedSizeBytes(PipelineOptions options) throws java.lang.Exception
java.lang.Exceptionpublic abstract boolean producesSortedKeys(PipelineOptions options) throws java.lang.Exception
java.lang.Exceptionpublic BoundedSource.BoundedReader<T> createReader(PipelineOptions options, @Nullable com.google.cloud.dataflow.sdk.util.ExecutionContext executionContext) throws java.io.IOException
SourcecreateReader in class Source<T>java.io.IOException