| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>FileBasedSource (Apache Beam 2.38.0-SNAPSHOT)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="FileBasedSource (Apache Beam 2.38.0-SNAPSHOT)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":10,"i2":6,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.Writer.html" title="class in org.apache.beam.sdk.io"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.FileBasedReader.html" title="class in org.apache.beam.sdk.io"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/beam/sdk/io/FileBasedSource.html" target="_top">Frames</a></li> |
| <li><a href="FileBasedSource.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.beam.sdk.io</div> |
| <h2 title="Class FileBasedSource" class="title">Class FileBasedSource<T></h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../org/apache/beam/sdk/io/Source.html" title="class in org.apache.beam.sdk.io">org.apache.beam.sdk.io.Source</a><T></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../org/apache/beam/sdk/io/BoundedSource.html" title="class in org.apache.beam.sdk.io">org.apache.beam.sdk.io.BoundedSource</a><T></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io">org.apache.beam.sdk.io.OffsetBasedSource</a><T></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.beam.sdk.io.FileBasedSource<T></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - Type of records represented by the source.</dd> |
| </dl> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd>java.io.Serializable, <a href="../../../../../org/apache/beam/sdk/transforms/display/HasDisplayData.html" title="interface in org.apache.beam.sdk.transforms.display">HasDisplayData</a></dd> |
| </dl> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><a href="../../../../../org/apache/beam/sdk/io/BlockBasedSource.html" title="class in org.apache.beam.sdk.io">BlockBasedSource</a>, <a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="class in org.apache.beam.sdk.io">CompressedSource</a>, <a href="../../../../../org/apache/beam/sdk/io/xml/XmlSource.html" title="class in org.apache.beam.sdk.io.xml">XmlSource</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public abstract class <span class="typeNameLabel">FileBasedSource<T></span> |
| extends <a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io">OffsetBasedSource</a><T></pre> |
| <div class="block">A common base class for all file-based <a href="../../../../../org/apache/beam/sdk/io/Source.html" title="class in org.apache.beam.sdk.io"><code>Source</code></a>s. Extend this class to implement your own |
| file-based custom source. |
| |
| <p>A file-based <code>Source</code> is a <code>Source</code> backed by a file pattern defined as a Java |
| glob, a single file, or a offset range for a single file. See <a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io"><code>OffsetBasedSource</code></a> and |
| <a href="../../../../../org/apache/beam/sdk/io/range/RangeTracker.html" title="interface in org.apache.beam.sdk.io.range"><code>RangeTracker</code></a> for semantics of offset ranges. |
| |
| <p>This source stores a <code>String</code> that is a <a href="../../../../../org/apache/beam/sdk/io/FileSystems.html" title="class in org.apache.beam.sdk.io"><code>FileSystems</code></a> specification for a file or |
| file pattern. There should be a <a href="../../../../../org/apache/beam/sdk/io/FileSystem.html" title="class in org.apache.beam.sdk.io"><code>FileSystem</code></a> registered for the file specification |
| provided. Please refer to <a href="../../../../../org/apache/beam/sdk/io/FileSystems.html" title="class in org.apache.beam.sdk.io"><code>FileSystems</code></a> and <a href="../../../../../org/apache/beam/sdk/io/FileSystem.html" title="class in org.apache.beam.sdk.io"><code>FileSystem</code></a> for more information on |
| this. |
| |
| <p>In addition to the methods left abstract from <code>BoundedSource</code>, subclasses must implement |
| methods to create a sub-source and a reader for a range of a single file - <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#createForSubrangeOfFile-org.apache.beam.sdk.io.fs.MatchResult.Metadata-long-long-"><code>createForSubrangeOfFile(org.apache.beam.sdk.io.fs.MatchResult.Metadata, long, long)</code></a> and <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#createSingleFileReader-org.apache.beam.sdk.options.PipelineOptions-"><code>createSingleFileReader(org.apache.beam.sdk.options.PipelineOptions)</code></a>. Please refer to <a href="../../../../../org/apache/beam/sdk/io/TextIO.html" title="class in org.apache.beam.sdk.io"><code>TextIO.TextSource</code></a> for an example implementation of <code>FileBasedSource</code>.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../serialized-form.html#org.apache.beam.sdk.io.FileBasedSource">Serialized Form</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Class and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.FileBasedReader.html" title="class in org.apache.beam.sdk.io">FileBasedSource.FileBasedReader</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.FileBasedReader.html" title="type parameter in FileBasedSource.FileBasedReader">T</a>></span></code> |
| <div class="block">A <a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html" title="class in org.apache.beam.sdk.io"><code>reader</code></a> that implements code common to readers of <code>FileBasedSource</code>s.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.Mode.html" title="enum in org.apache.beam.sdk.io">FileBasedSource.Mode</a></span></code> |
| <div class="block">A given <code>FileBasedSource</code> represents a file resource of one of these types.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.classes.inherited.from.class.org.apache.beam.sdk.io.OffsetBasedSource"> |
| <!-- --> |
| </a> |
| <h3>Nested classes/interfaces inherited from class org.apache.beam.sdk.io.<a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io">OffsetBasedSource</a></h3> |
| <code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.OffsetBasedReader.html" title="class in org.apache.beam.sdk.io">OffsetBasedSource.OffsetBasedReader</a><<a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.OffsetBasedReader.html" title="type parameter in OffsetBasedSource.OffsetBasedReader">T</a>></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.classes.inherited.from.class.org.apache.beam.sdk.io.BoundedSource"> |
| <!-- --> |
| </a> |
| <h3>Nested classes/interfaces inherited from class org.apache.beam.sdk.io.<a href="../../../../../org/apache/beam/sdk/io/BoundedSource.html" title="class in org.apache.beam.sdk.io">BoundedSource</a></h3> |
| <code><a href="../../../../../org/apache/beam/sdk/io/BoundedSource.BoundedReader.html" title="class in org.apache.beam.sdk.io">BoundedSource.BoundedReader</a><<a href="../../../../../org/apache/beam/sdk/io/BoundedSource.BoundedReader.html" title="type parameter in BoundedSource.BoundedReader">T</a>></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.classes.inherited.from.class.org.apache.beam.sdk.io.Source"> |
| <!-- --> |
| </a> |
| <h3>Nested classes/interfaces inherited from class org.apache.beam.sdk.io.<a href="../../../../../org/apache/beam/sdk/io/Source.html" title="class in org.apache.beam.sdk.io">Source</a></h3> |
| <code><a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html" title="class in org.apache.beam.sdk.io">Source.Reader</a><<a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html" title="type parameter in Source.Reader">T</a>></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier</th> |
| <th class="colLast" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#FileBasedSource-org.apache.beam.sdk.io.fs.MatchResult.Metadata-long-long-long-">FileBasedSource</a></span>(<a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.Metadata.html" title="class in org.apache.beam.sdk.io.fs">MatchResult.Metadata</a> fileMetadata, |
| long minBundleSize, |
| long startOffset, |
| long endOffset)</code> |
| <div class="block">Create a <code>FileBasedSource</code> based on a single file.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#FileBasedSource-org.apache.beam.sdk.options.ValueProvider-org.apache.beam.sdk.io.fs.EmptyMatchTreatment-long-">FileBasedSource</a></span>(<a href="../../../../../org/apache/beam/sdk/options/ValueProvider.html" title="interface in org.apache.beam.sdk.options">ValueProvider</a><java.lang.String> fileOrPatternSpec, |
| <a href="../../../../../org/apache/beam/sdk/io/fs/EmptyMatchTreatment.html" title="enum in org.apache.beam.sdk.io.fs">EmptyMatchTreatment</a> emptyMatchTreatment, |
| long minBundleSize)</code> |
| <div class="block">Create a <code>FileBaseSource</code> based on a file or a file pattern specification, with the given |
| strategy for treating filepatterns that do not match any files.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#FileBasedSource-org.apache.beam.sdk.options.ValueProvider-long-">FileBasedSource</a></span>(<a href="../../../../../org/apache/beam/sdk/options/ValueProvider.html" title="interface in org.apache.beam.sdk.options">ValueProvider</a><java.lang.String> fileOrPatternSpec, |
| long minBundleSize)</code> |
| <div class="block">Like <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#FileBasedSource-org.apache.beam.sdk.options.ValueProvider-org.apache.beam.sdk.io.fs.EmptyMatchTreatment-long-"><code>FileBasedSource(ValueProvider, EmptyMatchTreatment, long)</code></a>, but uses the default |
| value of <a href="../../../../../org/apache/beam/sdk/io/fs/EmptyMatchTreatment.html#DISALLOW"><code>EmptyMatchTreatment.DISALLOW</code></a>.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>protected abstract <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#createForSubrangeOfFile-org.apache.beam.sdk.io.fs.MatchResult.Metadata-long-long-">createForSubrangeOfFile</a></span>(<a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.Metadata.html" title="class in org.apache.beam.sdk.io.fs">MatchResult.Metadata</a> fileMetadata, |
| long start, |
| long end)</code> |
| <div class="block">Creates and returns a new <code>FileBasedSource</code> of the same type as the current <code>FileBasedSource</code> backed by a given file and an offset range.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/beam/sdk/io/BoundedSource.BoundedReader.html" title="class in org.apache.beam.sdk.io">BoundedSource.BoundedReader</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#createReader-org.apache.beam.sdk.options.PipelineOptions-">createReader</a></span>(<a href="../../../../../org/apache/beam/sdk/options/PipelineOptions.html" title="interface in org.apache.beam.sdk.options">PipelineOptions</a> options)</code> |
| <div class="block">Returns a new <a href="../../../../../org/apache/beam/sdk/io/BoundedSource.BoundedReader.html" title="class in org.apache.beam.sdk.io"><code>BoundedSource.BoundedReader</code></a> that reads from this source.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>protected abstract <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.FileBasedReader.html" title="class in org.apache.beam.sdk.io">FileBasedSource.FileBasedReader</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#createSingleFileReader-org.apache.beam.sdk.options.PipelineOptions-">createSingleFileReader</a></span>(<a href="../../../../../org/apache/beam/sdk/options/PipelineOptions.html" title="interface in org.apache.beam.sdk.options">PipelineOptions</a> options)</code> |
| <div class="block">Creates and returns an instance of a <code>FileBasedReader</code> implementation for the current |
| source assuming the source represents a single file.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#createSourceForSubrange-long-long-">createSourceForSubrange</a></span>(long start, |
| long end)</code> |
| <div class="block">Returns an <a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io"><code>OffsetBasedSource</code></a> for a subrange of the current source.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/beam/sdk/io/fs/EmptyMatchTreatment.html" title="enum in org.apache.beam.sdk.io.fs">EmptyMatchTreatment</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#getEmptyMatchTreatment--">getEmptyMatchTreatment</a></span>()</code> </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#getEstimatedSizeBytes-org.apache.beam.sdk.options.PipelineOptions-">getEstimatedSizeBytes</a></span>(<a href="../../../../../org/apache/beam/sdk/options/PipelineOptions.html" title="interface in org.apache.beam.sdk.options">PipelineOptions</a> options)</code> |
| <div class="block">An estimate of the total size (in bytes) of the data that would be read from this source.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#getFileOrPatternSpec--">getFileOrPatternSpec</a></span>()</code> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/beam/sdk/options/ValueProvider.html" title="interface in org.apache.beam.sdk.options">ValueProvider</a><java.lang.String></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#getFileOrPatternSpecProvider--">getFileOrPatternSpecProvider</a></span>()</code> </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#getMaxEndOffset-org.apache.beam.sdk.options.PipelineOptions-">getMaxEndOffset</a></span>(<a href="../../../../../org/apache/beam/sdk/options/PipelineOptions.html" title="interface in org.apache.beam.sdk.options">PipelineOptions</a> options)</code> |
| <div class="block">Returns the actual ending offset of the current source.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.Mode.html" title="enum in org.apache.beam.sdk.io">FileBasedSource.Mode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#getMode--">getMode</a></span>()</code> </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.Metadata.html" title="class in org.apache.beam.sdk.io.fs">MatchResult.Metadata</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#getSingleFileMetadata--">getSingleFileMetadata</a></span>()</code> |
| <div class="block">Returns the information about the single file that this source is reading from.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#isSplittable--">isSplittable</a></span>()</code> |
| <div class="block">Determines whether a file represented by this source is can be split into bundles.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#populateDisplayData-org.apache.beam.sdk.transforms.display.DisplayData.Builder-">populateDisplayData</a></span>(<a href="../../../../../org/apache/beam/sdk/transforms/display/DisplayData.Builder.html" title="interface in org.apache.beam.sdk.transforms.display">DisplayData.Builder</a> builder)</code> |
| <div class="block">Register display data for the given transform or component.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>java.util.List<? extends <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#split-long-org.apache.beam.sdk.options.PipelineOptions-">split</a></span>(long desiredBundleSizeBytes, |
| <a href="../../../../../org/apache/beam/sdk/options/PipelineOptions.html" title="interface in org.apache.beam.sdk.options">PipelineOptions</a> options)</code> |
| <div class="block">Splits the source into bundles of approximately <code>desiredBundleSizeBytes</code>.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#toString--">toString</a></span>()</code> </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#validate--">validate</a></span>()</code> |
| <div class="block">Checks that this source is valid, before it can be used in a pipeline.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.beam.sdk.io.OffsetBasedSource"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.beam.sdk.io.<a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io">OffsetBasedSource</a></h3> |
| <code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#getBytesPerOffset--">getBytesPerOffset</a>, <a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#getEndOffset--">getEndOffset</a>, <a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#getMinBundleSize--">getMinBundleSize</a>, <a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#getStartOffset--">getStartOffset</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.beam.sdk.io.Source"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.beam.sdk.io.<a href="../../../../../org/apache/beam/sdk/io/Source.html" title="class in org.apache.beam.sdk.io">Source</a></h3> |
| <code><a href="../../../../../org/apache/beam/sdk/io/Source.html#getDefaultOutputCoder--">getDefaultOutputCoder</a>, <a href="../../../../../org/apache/beam/sdk/io/Source.html#getOutputCoder--">getOutputCoder</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="FileBasedSource-org.apache.beam.sdk.options.ValueProvider-org.apache.beam.sdk.io.fs.EmptyMatchTreatment-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FileBasedSource</h4> |
| <pre>protected FileBasedSource(<a href="../../../../../org/apache/beam/sdk/options/ValueProvider.html" title="interface in org.apache.beam.sdk.options">ValueProvider</a><java.lang.String> fileOrPatternSpec, |
| <a href="../../../../../org/apache/beam/sdk/io/fs/EmptyMatchTreatment.html" title="enum in org.apache.beam.sdk.io.fs">EmptyMatchTreatment</a> emptyMatchTreatment, |
| long minBundleSize)</pre> |
| <div class="block">Create a <code>FileBaseSource</code> based on a file or a file pattern specification, with the given |
| strategy for treating filepatterns that do not match any files.</div> |
| </li> |
| </ul> |
| <a name="FileBasedSource-org.apache.beam.sdk.options.ValueProvider-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FileBasedSource</h4> |
| <pre>protected FileBasedSource(<a href="../../../../../org/apache/beam/sdk/options/ValueProvider.html" title="interface in org.apache.beam.sdk.options">ValueProvider</a><java.lang.String> fileOrPatternSpec, |
| long minBundleSize)</pre> |
| <div class="block">Like <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#FileBasedSource-org.apache.beam.sdk.options.ValueProvider-org.apache.beam.sdk.io.fs.EmptyMatchTreatment-long-"><code>FileBasedSource(ValueProvider, EmptyMatchTreatment, long)</code></a>, but uses the default |
| value of <a href="../../../../../org/apache/beam/sdk/io/fs/EmptyMatchTreatment.html#DISALLOW"><code>EmptyMatchTreatment.DISALLOW</code></a>.</div> |
| </li> |
| </ul> |
| <a name="FileBasedSource-org.apache.beam.sdk.io.fs.MatchResult.Metadata-long-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>FileBasedSource</h4> |
| <pre>protected FileBasedSource(<a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.Metadata.html" title="class in org.apache.beam.sdk.io.fs">MatchResult.Metadata</a> fileMetadata, |
| long minBundleSize, |
| long startOffset, |
| long endOffset)</pre> |
| <div class="block">Create a <code>FileBasedSource</code> based on a single file. This constructor must be used when |
| creating a new <code>FileBasedSource</code> for a subrange of a single file. Additionally, this |
| constructor must be used to create new <code>FileBasedSource</code>s when subclasses implement the |
| method <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#createForSubrangeOfFile-org.apache.beam.sdk.io.fs.MatchResult.Metadata-long-long-"><code>createForSubrangeOfFile(org.apache.beam.sdk.io.fs.MatchResult.Metadata, long, long)</code></a>. |
| |
| <p>See <a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io"><code>OffsetBasedSource</code></a> for detailed descriptions of <code>minBundleSize</code>, <code>startOffset</code>, and <code>endOffset</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fileMetadata</code> - specification of the file represented by the <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io"><code>FileBasedSource</code></a>, in |
| suitable form for use with <a href="../../../../../org/apache/beam/sdk/io/FileSystems.html#match-java.util.List-"><code>FileSystems.match(List)</code></a>.</dd> |
| <dd><code>minBundleSize</code> - minimum bundle size in bytes.</dd> |
| <dd><code>startOffset</code> - starting byte offset.</dd> |
| <dd><code>endOffset</code> - ending byte offset. If the specified value <code>>= #getMaxEndOffset()</code> it |
| implies <code>#getMaxEndOffSet()</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getSingleFileMetadata--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSingleFileMetadata</h4> |
| <pre>public final <a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.Metadata.html" title="class in org.apache.beam.sdk.io.fs">MatchResult.Metadata</a> getSingleFileMetadata()</pre> |
| <div class="block">Returns the information about the single file that this source is reading from.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if this source is in <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.Mode.html#FILEPATTERN"><code>FileBasedSource.Mode.FILEPATTERN</code></a> mode.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getFileOrPatternSpec--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFileOrPatternSpec</h4> |
| <pre>public final java.lang.String getFileOrPatternSpec()</pre> |
| </li> |
| </ul> |
| <a name="getFileOrPatternSpecProvider--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFileOrPatternSpecProvider</h4> |
| <pre>public final <a href="../../../../../org/apache/beam/sdk/options/ValueProvider.html" title="interface in org.apache.beam.sdk.options">ValueProvider</a><java.lang.String> getFileOrPatternSpecProvider()</pre> |
| </li> |
| </ul> |
| <a name="getEmptyMatchTreatment--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getEmptyMatchTreatment</h4> |
| <pre>public final <a href="../../../../../org/apache/beam/sdk/io/fs/EmptyMatchTreatment.html" title="enum in org.apache.beam.sdk.io.fs">EmptyMatchTreatment</a> getEmptyMatchTreatment()</pre> |
| </li> |
| </ul> |
| <a name="getMode--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMode</h4> |
| <pre>public final <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.Mode.html" title="enum in org.apache.beam.sdk.io">FileBasedSource.Mode</a> getMode()</pre> |
| </li> |
| </ul> |
| <a name="createSourceForSubrange-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createSourceForSubrange</h4> |
| <pre>public final <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>> createSourceForSubrange(long start, |
| long end)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#createSourceForSubrange-long-long-">OffsetBasedSource</a></code></span></div> |
| <div class="block">Returns an <a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io"><code>OffsetBasedSource</code></a> for a subrange of the current source. The subrange <code>[start, end)</code> must be within the range <code>[startOffset, endOffset)</code> of the current source, |
| i.e. <code>startOffset <= start < end <= endOffset</code>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#createSourceForSubrange-long-long-">createSourceForSubrange</a></code> in class <code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io">OffsetBasedSource</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createForSubrangeOfFile-org.apache.beam.sdk.io.fs.MatchResult.Metadata-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createForSubrangeOfFile</h4> |
| <pre>protected abstract <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>> createForSubrangeOfFile(<a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.Metadata.html" title="class in org.apache.beam.sdk.io.fs">MatchResult.Metadata</a> fileMetadata, |
| long start, |
| long end)</pre> |
| <div class="block">Creates and returns a new <code>FileBasedSource</code> of the same type as the current <code>FileBasedSource</code> backed 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 constructor <code>#FileBasedSource(Metadata, long, long, long)</code> of <code>FileBasedSource</code> with corresponding parameter values passed here.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fileMetadata</code> - file backing the new <code>FileBasedSource</code>.</dd> |
| <dd><code>start</code> - starting byte offset of the new <code>FileBasedSource</code>.</dd> |
| <dd><code>end</code> - ending byte offset of the new <code>FileBasedSource</code>. May be Long.MAX_VALUE, in |
| which case it will be inferred using <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#getMaxEndOffset-org.apache.beam.sdk.options.PipelineOptions-"><code>getMaxEndOffset(org.apache.beam.sdk.options.PipelineOptions)</code></a>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createSingleFileReader-org.apache.beam.sdk.options.PipelineOptions-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createSingleFileReader</h4> |
| <pre>protected abstract <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.FileBasedReader.html" title="class in org.apache.beam.sdk.io">FileBasedSource.FileBasedReader</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>> createSingleFileReader(<a href="../../../../../org/apache/beam/sdk/options/PipelineOptions.html" title="interface in org.apache.beam.sdk.options">PipelineOptions</a> options)</pre> |
| <div class="block">Creates and returns an instance of a <code>FileBasedReader</code> implementation for the current |
| source assuming the source represents a single file. File patterns will be handled by <code>FileBasedSource</code> implementation automatically.</div> |
| </li> |
| </ul> |
| <a name="getEstimatedSizeBytes-org.apache.beam.sdk.options.PipelineOptions-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getEstimatedSizeBytes</h4> |
| <pre>public final long getEstimatedSizeBytes(<a href="../../../../../org/apache/beam/sdk/options/PipelineOptions.html" title="interface in org.apache.beam.sdk.options">PipelineOptions</a> options) |
| throws java.io.IOException</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/beam/sdk/io/BoundedSource.html#getEstimatedSizeBytes-org.apache.beam.sdk.options.PipelineOptions-">BoundedSource</a></code></span></div> |
| <div class="block">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. |
| |
| <p>If there is no way to estimate the size of the source implementations MAY return 0L.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#getEstimatedSizeBytes-org.apache.beam.sdk.options.PipelineOptions-">getEstimatedSizeBytes</a></code> in class <code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io">OffsetBasedSource</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>></code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="populateDisplayData-org.apache.beam.sdk.transforms.display.DisplayData.Builder-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>populateDisplayData</h4> |
| <pre>public void populateDisplayData(<a href="../../../../../org/apache/beam/sdk/transforms/display/DisplayData.Builder.html" title="interface in org.apache.beam.sdk.transforms.display">DisplayData.Builder</a> builder)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/beam/sdk/io/Source.html#populateDisplayData-org.apache.beam.sdk.transforms.display.DisplayData.Builder-">Source</a></code></span></div> |
| <div class="block">Register display data for the given transform or component. |
| |
| <p><code>populateDisplayData(DisplayData.Builder)</code> is invoked by Pipeline runners to collect |
| display data via <a href="../../../../../org/apache/beam/sdk/transforms/display/DisplayData.html#from-org.apache.beam.sdk.transforms.display.HasDisplayData-"><code>DisplayData.from(HasDisplayData)</code></a>. Implementations may call <code>super.populateDisplayData(builder)</code> in order to register display data in the current namespace, |
| but should otherwise use <code>subcomponent.populateDisplayData(builder)</code> to use the namespace |
| of the subcomponent. |
| |
| <p>By default, does not register any display data. Implementors may override this method to |
| provide their own display data.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/beam/sdk/transforms/display/HasDisplayData.html#populateDisplayData-org.apache.beam.sdk.transforms.display.DisplayData.Builder-">populateDisplayData</a></code> in interface <code><a href="../../../../../org/apache/beam/sdk/transforms/display/HasDisplayData.html" title="interface in org.apache.beam.sdk.transforms.display">HasDisplayData</a></code></dd> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#populateDisplayData-org.apache.beam.sdk.transforms.display.DisplayData.Builder-">populateDisplayData</a></code> in class <code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io">OffsetBasedSource</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>builder</code> - The builder to populate with display data.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/apache/beam/sdk/transforms/display/HasDisplayData.html" title="interface in org.apache.beam.sdk.transforms.display"><code>HasDisplayData</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="split-long-org.apache.beam.sdk.options.PipelineOptions-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>split</h4> |
| <pre>public final java.util.List<? extends <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>>> split(long desiredBundleSizeBytes, |
| <a href="../../../../../org/apache/beam/sdk/options/PipelineOptions.html" title="interface in org.apache.beam.sdk.options">PipelineOptions</a> options) |
| throws java.lang.Exception</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/beam/sdk/io/BoundedSource.html#split-long-org.apache.beam.sdk.options.PipelineOptions-">BoundedSource</a></code></span></div> |
| <div class="block">Splits the source into bundles of approximately <code>desiredBundleSizeBytes</code>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#split-long-org.apache.beam.sdk.options.PipelineOptions-">split</a></code> in class <code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io">OffsetBasedSource</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>></code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.Exception</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isSplittable--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isSplittable</h4> |
| <pre>protected boolean isSplittable() |
| throws java.lang.Exception</pre> |
| <div class="block">Determines whether a file represented by this source is can be split into bundles. |
| |
| <p>By default, a source in mode <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.Mode.html#FILEPATTERN"><code>FileBasedSource.Mode.FILEPATTERN</code></a> is always splittable, because |
| splitting will involve expanding the file pattern and producing single-file/subrange sources, |
| which may or may not be splittable themselves. |
| |
| <p>By default, a source in <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.Mode.html#SINGLE_FILE_OR_SUBRANGE"><code>FileBasedSource.Mode.SINGLE_FILE_OR_SUBRANGE</code></a> is splittable if it is on a |
| file system that supports efficient read seeking. |
| |
| <p>Subclasses may override to provide different behavior.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.Exception</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createReader-org.apache.beam.sdk.options.PipelineOptions-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createReader</h4> |
| <pre>public final <a href="../../../../../org/apache/beam/sdk/io/BoundedSource.BoundedReader.html" title="class in org.apache.beam.sdk.io">BoundedSource.BoundedReader</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>> createReader(<a href="../../../../../org/apache/beam/sdk/options/PipelineOptions.html" title="interface in org.apache.beam.sdk.options">PipelineOptions</a> options) |
| throws java.io.IOException</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/beam/sdk/io/BoundedSource.html#createReader-org.apache.beam.sdk.options.PipelineOptions-">BoundedSource</a></code></span></div> |
| <div class="block">Returns a new <a href="../../../../../org/apache/beam/sdk/io/BoundedSource.BoundedReader.html" title="class in org.apache.beam.sdk.io"><code>BoundedSource.BoundedReader</code></a> that reads from this source.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/beam/sdk/io/BoundedSource.html#createReader-org.apache.beam.sdk.options.PipelineOptions-">createReader</a></code> in class <code><a href="../../../../../org/apache/beam/sdk/io/BoundedSource.html" title="class in org.apache.beam.sdk.io">BoundedSource</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>></code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toString--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre>public java.lang.String toString()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#toString--">toString</a></code> in class <code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io">OffsetBasedSource</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="validate--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>validate</h4> |
| <pre>public void validate()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/beam/sdk/io/Source.html#validate--">Source</a></code></span></div> |
| <div class="block">Checks that this source is valid, before it can be used in a pipeline. |
| |
| <p>It is recommended to use <code>Preconditions</code> for implementing this method.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#validate--">validate</a></code> in class <code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io">OffsetBasedSource</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMaxEndOffset-org.apache.beam.sdk.options.PipelineOptions-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getMaxEndOffset</h4> |
| <pre>public final long getMaxEndOffset(<a href="../../../../../org/apache/beam/sdk/options/PipelineOptions.html" title="interface in org.apache.beam.sdk.options">PipelineOptions</a> options) |
| throws java.io.IOException</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#getMaxEndOffset-org.apache.beam.sdk.options.PipelineOptions-">OffsetBasedSource</a></code></span></div> |
| <div class="block">Returns the actual ending offset of the current source. The value returned by this function |
| will be used to clip the end of the range <code>[startOffset, endOffset)</code> such that the range |
| used is <code>[startOffset, min(endOffset, maxEndOffset))</code>. |
| |
| <p>As an example in which <a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io"><code>OffsetBasedSource</code></a> is used to implement a file source, suppose |
| that this source was constructed with an <code>endOffset</code> of <code>Long.MAX_VALUE</code> to |
| indicate that a file should be read to the end. Then this function should determine the actual, |
| exact size of the file in bytes and return it.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#getMaxEndOffset-org.apache.beam.sdk.options.PipelineOptions-">getMaxEndOffset</a></code> in class <code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io">OffsetBasedSource</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="type parameter in FileBasedSource">T</a>></code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.Writer.html" title="class in org.apache.beam.sdk.io"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.FileBasedReader.html" title="class in org.apache.beam.sdk.io"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/beam/sdk/io/FileBasedSource.html" target="_top">Frames</a></li> |
| <li><a href="FileBasedSource.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |