protected static class MongoDbGridFSIO.Read.BoundedGridFSSource extends BoundedSource<org.bson.types.ObjectId>
BoundedSource
for MongoDB GridFS.BoundedSource.BoundedReader<T>
Source.Reader<T>
Modifier and Type | Method and Description |
---|---|
BoundedSource.BoundedReader<org.bson.types.ObjectId> |
createReader(PipelineOptions options)
Returns a new
BoundedSource.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.
|
Coder<org.bson.types.ObjectId> |
getOutputCoder()
Returns the
Coder to use for the data read from this source. |
void |
populateDisplayData(DisplayData.Builder builder)
Register display data for the given transform or component.
|
java.util.List<? extends BoundedSource<org.bson.types.ObjectId>> |
split(long desiredBundleSizeBytes,
PipelineOptions options)
Splits the source into bundles of approximately
desiredBundleSizeBytes . |
getDefaultOutputCoder, validate
public java.util.List<? extends BoundedSource<org.bson.types.ObjectId>> split(long desiredBundleSizeBytes, PipelineOptions options) throws java.lang.Exception
BoundedSource
desiredBundleSizeBytes
.split
in class BoundedSource<org.bson.types.ObjectId>
java.lang.Exception
public long getEstimatedSizeBytes(PipelineOptions options) throws java.lang.Exception
BoundedSource
If there is no way to estimate the size of the source implementations MAY return 0L.
getEstimatedSizeBytes
in class BoundedSource<org.bson.types.ObjectId>
java.lang.Exception
public BoundedSource.BoundedReader<org.bson.types.ObjectId> createReader(PipelineOptions options) throws java.io.IOException
BoundedSource
BoundedSource.BoundedReader
that reads from this source.createReader
in class BoundedSource<org.bson.types.ObjectId>
java.io.IOException
public void populateDisplayData(DisplayData.Builder builder)
Source
populateDisplayData(DisplayData.Builder)
is invoked by Pipeline runners to collect
display data via DisplayData.from(HasDisplayData)
. Implementations may call super.populateDisplayData(builder)
in order to register display data in the current namespace,
but should otherwise use subcomponent.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.
populateDisplayData
in interface HasDisplayData
populateDisplayData
in class Source<org.bson.types.ObjectId>
builder
- The builder to populate with display data.HasDisplayData
public Coder<org.bson.types.ObjectId> getOutputCoder()
Source
Coder
to use for the data read from this source.getOutputCoder
in class Source<org.bson.types.ObjectId>