Package org.apache.beam.sdk.io.mongodb
Class MongoDbGridFSIO.Read.BoundedGridFSSource
java.lang.Object
org.apache.beam.sdk.io.Source<ObjectId>
org.apache.beam.sdk.io.BoundedSource<ObjectId>
org.apache.beam.sdk.io.mongodb.MongoDbGridFSIO.Read.BoundedGridFSSource
- All Implemented Interfaces:
Serializable
,HasDisplayData
- Enclosing class:
MongoDbGridFSIO.Read<T>
A
BoundedSource
for MongoDB GridFS.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.beam.sdk.io.BoundedSource
BoundedSource.BoundedReader<T>
Nested classes/interfaces inherited from class org.apache.beam.sdk.io.Source
Source.Reader<T>
-
Method Summary
Modifier and TypeMethodDescriptioncreateReader
(PipelineOptions options) Returns a newBoundedSource.BoundedReader
that reads from this source.long
getEstimatedSizeBytes
(PipelineOptions options) An estimate of the total size (in bytes) of the data that would be read from this source.Returns theCoder
to use for the data read from this source.void
populateDisplayData
(DisplayData.Builder builder) Register display data for the given transform or component.List
<? extends BoundedSource<ObjectId>> split
(long desiredBundleSizeBytes, PipelineOptions options) Splits the source into bundles of approximatelydesiredBundleSizeBytes
.Methods inherited from class org.apache.beam.sdk.io.Source
getDefaultOutputCoder, validate
-
Method Details
-
split
public List<? extends BoundedSource<ObjectId>> split(long desiredBundleSizeBytes, PipelineOptions options) throws Exception Description copied from class:BoundedSource
Splits the source into bundles of approximatelydesiredBundleSizeBytes
.- Specified by:
split
in classBoundedSource<ObjectId>
- Throws:
Exception
-
getEstimatedSizeBytes
Description copied from class:BoundedSource
An estimate of the total size (in bytes) of the data that would be read from this source. This estimate is in terms of external storage size, before any decompression or other processing done by the reader.If there is no way to estimate the size of the source implementations MAY return 0L.
- Specified by:
getEstimatedSizeBytes
in classBoundedSource<ObjectId>
- Throws:
Exception
-
createReader
public BoundedSource.BoundedReader<ObjectId> createReader(PipelineOptions options) throws IOException Description copied from class:BoundedSource
Returns a newBoundedSource.BoundedReader
that reads from this source.- Specified by:
createReader
in classBoundedSource<ObjectId>
- Throws:
IOException
-
populateDisplayData
Description copied from class:Source
Register display data for the given transform or component.populateDisplayData(DisplayData.Builder)
is invoked by Pipeline runners to collect display data viaDisplayData.from(HasDisplayData)
. Implementations may callsuper.populateDisplayData(builder)
in order to register display data in the current namespace, but should otherwise usesubcomponent.populateDisplayData(builder)
to use the namespace of the subcomponent.By default, does not register any display data. Implementors may override this method to provide their own display data.
- Specified by:
populateDisplayData
in interfaceHasDisplayData
- Overrides:
populateDisplayData
in classSource<ObjectId>
- Parameters:
builder
- The builder to populate with display data.- See Also:
-
getOutputCoder
Description copied from class:Source
Returns theCoder
to use for the data read from this source.- Overrides:
getOutputCoder
in classSource<ObjectId>
-