Class ElasticsearchIO.BoundedElasticsearchSource
java.lang.Object
org.apache.beam.sdk.io.Source<String>
org.apache.beam.sdk.io.BoundedSource<String>
org.apache.beam.sdk.io.elasticsearch.ElasticsearchIO.BoundedElasticsearchSource
- All Implemented Interfaces:
Serializable,HasDisplayData
- Enclosing class:
ElasticsearchIO
A
BoundedSource reading from Elasticsearch.- 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.BoundedReaderthat reads from this source.longgetEstimatedSizeBytes(PipelineOptions options) An estimate of the total size (in bytes) of the data that would be read from this source.Returns theCoderto use for the data read from this source.voidpopulateDisplayData(DisplayData.Builder builder) Register display data for the given transform or component.List<? extends BoundedSource<String>> split(long desiredBundleSizeBytes, PipelineOptions options) Splits the source into bundles of approximatelydesiredBundleSizeBytes.voidvalidate()Checks that this source is valid, before it can be used in a pipeline.Methods inherited from class org.apache.beam.sdk.io.Source
getDefaultOutputCoder
-
Method Details
-
split
public List<? extends BoundedSource<String>> split(long desiredBundleSizeBytes, PipelineOptions options) throws Exception Description copied from class:BoundedSourceSplits the source into bundles of approximatelydesiredBundleSizeBytes.- Specified by:
splitin classBoundedSource<String>- Throws:
Exception
-
getEstimatedSizeBytes
Description copied from class:BoundedSourceAn 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:
getEstimatedSizeBytesin classBoundedSource<String>- Throws:
IOException
-
populateDisplayData
Description copied from class:SourceRegister 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:
populateDisplayDatain interfaceHasDisplayData- Overrides:
populateDisplayDatain classSource<String>- Parameters:
builder- The builder to populate with display data.- See Also:
-
createReader
Description copied from class:BoundedSourceReturns a newBoundedSource.BoundedReaderthat reads from this source.- Specified by:
createReaderin classBoundedSource<String>
-
validate
public void validate()Description copied from class:SourceChecks that this source is valid, before it can be used in a pipeline.It is recommended to use
Preconditionsfor implementing this method. -
getOutputCoder
Description copied from class:SourceReturns theCoderto use for the data read from this source.- Overrides:
getOutputCoderin classSource<String>
-