Package org.apache.beam.sdk.io.xml
Class XmlSource<T>
java.lang.Object
org.apache.beam.sdk.io.Source<T>
org.apache.beam.sdk.io.BoundedSource<T>
org.apache.beam.sdk.io.OffsetBasedSource<T>
org.apache.beam.sdk.io.FileBasedSource<T>
org.apache.beam.sdk.io.xml.XmlSource<T>
- All Implemented Interfaces:
Serializable,HasDisplayData
Implementation of
XmlIO.read().- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.beam.sdk.io.FileBasedSource
FileBasedSource.FileBasedReader<T>, FileBasedSource.ModeNested classes/interfaces inherited from class org.apache.beam.sdk.io.OffsetBasedSource
OffsetBasedSource.OffsetBasedReader<T>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 TypeMethodDescriptionprotected FileBasedSource<T> createForSubrangeOfFile(MatchResult.Metadata metadata, long start, long end) Creates and returns a newFileBasedSourceof the same type as the currentFileBasedSourcebacked by a given file and an offset range.protected FileBasedSource.FileBasedReader<T> createSingleFileReader(PipelineOptions options) Creates and returns an instance of aFileBasedReaderimplementation for the current source assuming the source represents a single file.Returns theCoderto use for the data read from this source.Methods inherited from class org.apache.beam.sdk.io.FileBasedSource
createReader, createSourceForSubrange, getEmptyMatchTreatment, getEstimatedSizeBytes, getFileOrPatternSpec, getFileOrPatternSpecProvider, getMaxEndOffset, getMode, getSingleFileMetadata, isSplittable, populateDisplayData, split, toString, validateMethods inherited from class org.apache.beam.sdk.io.OffsetBasedSource
getBytesPerOffset, getEndOffset, getMinBundleSize, getStartOffsetMethods inherited from class org.apache.beam.sdk.io.Source
getDefaultOutputCoder
-
Method Details
-
createForSubrangeOfFile
protected FileBasedSource<T> createForSubrangeOfFile(MatchResult.Metadata metadata, long start, long end) Description copied from class:FileBasedSourceCreates and returns a newFileBasedSourceof the same type as the currentFileBasedSourcebacked by a given file and an offset range. When current source is being split, this method is used to generate new sub-sources. When creating the source subclasses must call the constructorFileBasedSource(Metadata, long, long, long)ofFileBasedSourcewith corresponding parameter values passed here.- Specified by:
createForSubrangeOfFilein classFileBasedSource<T>- Parameters:
metadata- file backing the newFileBasedSource.start- starting byte offset of the newFileBasedSource.end- ending byte offset of the newFileBasedSource. May be Long.MAX_VALUE, in which case it will be inferred usingFileBasedSource.getMaxEndOffset(org.apache.beam.sdk.options.PipelineOptions).
-
createSingleFileReader
Description copied from class:FileBasedSourceCreates and returns an instance of aFileBasedReaderimplementation for the current source assuming the source represents a single file. File patterns will be handled byFileBasedSourceimplementation automatically.- Specified by:
createSingleFileReaderin classFileBasedSource<T>
-
getOutputCoder
Description copied from class:SourceReturns theCoderto use for the data read from this source.- Overrides:
getOutputCoderin classSource<T>
-