blob: cd71db816e180e9f2bc606265c6b490bde8ac270 [file] [log] [blame]
<!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 (1.8.0_181-google-v7) on Wed Aug 14 17:37:14 PDT 2019 -->
<title>UnboundedSource.UnboundedReader (Apache Beam 2.15.0-SNAPSHOT)</title>
<meta name="date" content="2019-08-14">
<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="UnboundedSource.UnboundedReader (Apache Beam 2.15.0-SNAPSHOT)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":10,"i3":6,"i4":10,"i5":10,"i6":6,"i7":6};
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/UnboundedSource.CheckpointMark.NoopCheckpointMark.html" title="class in org.apache.beam.sdk.io"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/beam/sdk/io/WriteFiles.html" title="class in org.apache.beam.sdk.io"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html" target="_top">Frames</a></li>
<li><a href="UnboundedSource.UnboundedReader.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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 UnboundedSource.UnboundedReader" class="title">Class UnboundedSource.UnboundedReader&lt;OutputT&gt;</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.Reader.html" title="class in org.apache.beam.sdk.io">org.apache.beam.sdk.io.Source.Reader</a>&lt;OutputT&gt;</li>
<li>
<ul class="inheritance">
<li>org.apache.beam.sdk.io.UnboundedSource.UnboundedReader&lt;OutputT&gt;</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.lang.AutoCloseable</dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.html" title="class in org.apache.beam.sdk.io">UnboundedSource</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.html" title="type parameter in UnboundedSource">OutputT</a>,<a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.html" title="type parameter in UnboundedSource">CheckpointMarkT</a> extends <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.CheckpointMark.html" title="interface in org.apache.beam.sdk.io">UnboundedSource.CheckpointMark</a>&gt;</dd>
</dl>
<hr>
<br>
<pre><a href="../../../../../org/apache/beam/sdk/annotations/Experimental.html" title="annotation in org.apache.beam.sdk.annotations">@Experimental</a>(<a href="../../../../../org/apache/beam/sdk/annotations/Experimental.html#value--">value</a>=<a href="../../../../../org/apache/beam/sdk/annotations/Experimental.Kind.html#SOURCE_SINK">SOURCE_SINK</a>)
public abstract static class <span class="typeNameLabel">UnboundedSource.UnboundedReader&lt;OutputT&gt;</span>
extends <a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html" title="class in org.apache.beam.sdk.io">Source.Reader</a>&lt;OutputT&gt;</pre>
<div class="block">A <code>Reader</code> that reads an unbounded amount of input.
<p>A given <code>UnboundedReader</code> object will only be accessed by a single thread at once.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#BACKLOG_UNKNOWN">BACKLOG_UNKNOWN</a></span></code>
<div class="block">Constant representing an unknown amount of backlog.</div>
</td>
</tr>
</table>
</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">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#UnboundedReader--">UnboundedReader</a></span>()</code>&nbsp;</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">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#advance--">advance</a></span>()</code>
<div class="block">Advances the reader to the next valid record.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>abstract <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.CheckpointMark.html" title="interface in org.apache.beam.sdk.io">UnboundedSource.CheckpointMark</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#getCheckpointMark--">getCheckpointMark</a></span>()</code>
<div class="block">Returns a <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.CheckpointMark.html" title="interface in org.apache.beam.sdk.io"><code>UnboundedSource.CheckpointMark</code></a> representing the progress of this <code>UnboundedReader</code>.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#getCurrentRecordId--">getCurrentRecordId</a></span>()</code>
<div class="block">Returns a unique identifier for the current record.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>abstract <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.html" title="class in org.apache.beam.sdk.io">UnboundedSource</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html" title="type parameter in UnboundedSource.UnboundedReader">OutputT</a>,?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#getCurrentSource--">getCurrentSource</a></span>()</code>
<div class="block">Returns the <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.html" title="class in org.apache.beam.sdk.io"><code>UnboundedSource</code></a> that created this reader.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#getSplitBacklogBytes--">getSplitBacklogBytes</a></span>()</code>
<div class="block">Returns the size of the backlog of unread data in the underlying data source represented by
this split of this source.</div>
</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/UnboundedSource.UnboundedReader.html#getTotalBacklogBytes--">getTotalBacklogBytes</a></span>()</code>
<div class="block">Returns the size of the backlog of unread data in the underlying data source represented by
all splits of this source.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>abstract <a href="https://static.javadoc.io/joda-time/joda-time/2.10.1/org/joda/time/Instant.html?is-external=true" title="class or interface in org.joda.time">Instant</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#getWatermark--">getWatermark</a></span>()</code>
<div class="block">Returns a timestamp before or at the timestamps of all future elements read by this reader.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#start--">start</a></span>()</code>
<div class="block">Initializes the reader and advances the reader to the first record.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.beam.sdk.io.Source.Reader">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.beam.sdk.io.<a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html" title="class in org.apache.beam.sdk.io">Source.Reader</a></h3>
<code><a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html#close--">close</a>, <a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html#getCurrent--">getCurrent</a>, <a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html#getCurrentTimestamp--">getCurrentTimestamp</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&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="BACKLOG_UNKNOWN">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BACKLOG_UNKNOWN</h4>
<pre>public static final&nbsp;long BACKLOG_UNKNOWN</pre>
<div class="block">Constant representing an unknown amount of backlog.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.beam.sdk.io.UnboundedSource.UnboundedReader.BACKLOG_UNKNOWN">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="UnboundedReader--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>UnboundedReader</h4>
<pre>public&nbsp;UnboundedReader()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="start--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>public abstract&nbsp;boolean&nbsp;start()
throws java.io.IOException</pre>
<div class="block">Initializes the reader and advances the reader to the first record. If the reader has been
restored from a checkpoint then it should advance to the next unread record at the point the
checkpoint was taken.
<p>This method will be called exactly once. The invocation will occur prior to calling <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#advance--"><code>advance()</code></a> or <a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html#getCurrent--"><code>Source.Reader.getCurrent()</code></a>. This method may perform expensive operations that are
needed to initialize the reader.
<p>Returns <code>true</code> if a record was read, <code>false</code> if there is no more input
currently available. Future calls to <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#advance--"><code>advance()</code></a> may return <code>true</code> once more data
is available. Regardless of the return value of <code>start</code>, <code>start</code> will not be
called again on the same <code>UnboundedReader</code> object; it will only be called again when a
new reader object is constructed for the same source, e.g. on recovery.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html#start--">start</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html" title="class in org.apache.beam.sdk.io">Source.Reader</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html" title="type parameter in UnboundedSource.UnboundedReader">OutputT</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if a record was read, <code>false</code> if there is no more input available.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="advance--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>advance</h4>
<pre>public abstract&nbsp;boolean&nbsp;advance()
throws java.io.IOException</pre>
<div class="block">Advances the reader to the next valid record.
<p>Returns <code>true</code> if a record was read, <code>false</code> if there is no more input
available. Future calls to <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#advance--"><code>advance()</code></a> may return <code>true</code> once more data is
available.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html#advance--">advance</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html" title="class in org.apache.beam.sdk.io">Source.Reader</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html" title="type parameter in UnboundedSource.UnboundedReader">OutputT</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if a record was read, <code>false</code> if there is no more input available.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="getCurrentRecordId--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentRecordId</h4>
<pre>public&nbsp;byte[]&nbsp;getCurrentRecordId()
throws java.util.NoSuchElementException</pre>
<div class="block">Returns a unique identifier for the current record. This should be the same for each instance
of the same logical record read from the underlying data source.
<p>It is only necessary to override this if <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.html#requiresDeduping--"><code>UnboundedSource.requiresDeduping()</code></a> has been overridden to
return true.
<p>For example, this could be a hash of the record contents, or a logical ID present in the
record. If this is generated as a hash of the record contents, it should be at least 16 bytes
(128 bits) to avoid collisions.
<p>This method has the same restrictions on when it can be called as <a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html#getCurrent--"><code>Source.Reader.getCurrent()</code></a> and
<a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html#getCurrentTimestamp--"><code>Source.Reader.getCurrentTimestamp()</code></a>.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.util.NoSuchElementException</code> - if the reader is at the beginning of the input and <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#start--"><code>start()</code></a> or <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#advance--"><code>advance()</code></a> wasn't called, or if the last <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#start--"><code>start()</code></a> or <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#advance--"><code>advance()</code></a> returned <code>false</code>.</dd>
</dl>
</li>
</ul>
<a name="getWatermark--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWatermark</h4>
<pre>public abstract&nbsp;<a href="https://static.javadoc.io/joda-time/joda-time/2.10.1/org/joda/time/Instant.html?is-external=true" title="class or interface in org.joda.time">Instant</a>&nbsp;getWatermark()</pre>
<div class="block">Returns a timestamp before or at the timestamps of all future elements read by this reader.
<p>This can be approximate. If records are read that violate this guarantee, they will be
considered late, which will affect how they will be processed. See <a href="../../../../../org/apache/beam/sdk/transforms/windowing/Window.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>Window</code></a> for more information on late data and how to
handle it.
<p>However, this value should be as late as possible. Downstream windows may not be able to
close until this watermark passes their end.
<p>For example, a source may know that the records it reads will be in timestamp order. In
this case, the watermark can be the timestamp of the last record read. For a source that does
not have natural timestamps, timestamps can be set to the time of reading, in which case the
watermark is the current clock time.
<p>See <a href="../../../../../org/apache/beam/sdk/transforms/windowing/Window.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>Window</code></a> and <a href="../../../../../org/apache/beam/sdk/transforms/windowing/Trigger.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>Trigger</code></a> for more information on timestamps and
watermarks.
<p>May be called after <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#advance--"><code>advance()</code></a> or <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#start--"><code>start()</code></a> has returned false, but not before
<a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#start--"><code>start()</code></a> has been called.</div>
</li>
</ul>
<a name="getCheckpointMark--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCheckpointMark</h4>
<pre>public abstract&nbsp;<a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.CheckpointMark.html" title="interface in org.apache.beam.sdk.io">UnboundedSource.CheckpointMark</a>&nbsp;getCheckpointMark()</pre>
<div class="block">Returns a <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.CheckpointMark.html" title="interface in org.apache.beam.sdk.io"><code>UnboundedSource.CheckpointMark</code></a> representing the progress of this <code>UnboundedReader</code>.
<p>If this <code>UnboundedReader</code> does not support checkpoints, it may return a
CheckpointMark which does nothing, like:
<pre><code>
public UnboundedSource.CheckpointMark getCheckpointMark() {
return new UnboundedSource.CheckpointMark() {
public void finalizeCheckpoint() throws IOException {
// nothing to do
}
};
}
</code></pre>
<p>All elements read between the last time this method was called (or since this reader was
created, if this method has not been called on this reader) until this method is called will
be processed together as a bundle. (An element is considered 'read' if it could be returned
by a call to <a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html#getCurrent--"><code>Source.Reader.getCurrent()</code></a>.)
<p>Once the result of processing those elements and the returned checkpoint have been durably
committed, <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.CheckpointMark.html#finalizeCheckpoint--"><code>UnboundedSource.CheckpointMark.finalizeCheckpoint()</code></a> will be called at most once at some
later point on the returned <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.CheckpointMark.html" title="interface in org.apache.beam.sdk.io"><code>UnboundedSource.CheckpointMark</code></a> object. Checkpoint finalization is
best-effort, and checkpoints may not be finalized. If duplicate elements may be produced if
checkpoints are not finalized in a timely manner, <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.html#requiresDeduping--"><code>UnboundedSource.requiresDeduping()</code></a>
should be overridden to return true, and <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#getCurrentRecordId--"><code>getCurrentRecordId()</code></a> should
be overridden to return unique record IDs.
<p>A checkpoint will be committed to durable storage only if all all previous checkpoints
produced by the same reader have also been committed.
<p>The returned object should not be modified.
<p>May not be called before <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#start--"><code>start()</code></a> has been called.</div>
</li>
</ul>
<a name="getSplitBacklogBytes--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSplitBacklogBytes</h4>
<pre>public&nbsp;long&nbsp;getSplitBacklogBytes()</pre>
<div class="block">Returns the size of the backlog of unread data in the underlying data source represented by
this split of this source.
<p>One of this or <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#getTotalBacklogBytes--"><code>getTotalBacklogBytes()</code></a> should be overridden in order to allow the
runner to scale the amount of resources allocated to the pipeline.</div>
</li>
</ul>
<a name="getTotalBacklogBytes--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTotalBacklogBytes</h4>
<pre>public&nbsp;long&nbsp;getTotalBacklogBytes()</pre>
<div class="block">Returns the size of the backlog of unread data in the underlying data source represented by
all splits of this source.
<p>One of this or <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html#getSplitBacklogBytes--"><code>getSplitBacklogBytes()</code></a> should be overridden in order to allow the
runner to scale the amount of resources allocated to the pipeline.</div>
</li>
</ul>
<a name="getCurrentSource--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getCurrentSource</h4>
<pre>public abstract&nbsp;<a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.html" title="class in org.apache.beam.sdk.io">UnboundedSource</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html" title="type parameter in UnboundedSource.UnboundedReader">OutputT</a>,?&gt;&nbsp;getCurrentSource()</pre>
<div class="block">Returns the <a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.html" title="class in org.apache.beam.sdk.io"><code>UnboundedSource</code></a> that created this reader. This will not change over the
life of the reader.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html#getCurrentSource--">getCurrentSource</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html" title="class in org.apache.beam.sdk.io">Source.Reader</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html" title="type parameter in UnboundedSource.UnboundedReader">OutputT</a>&gt;</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/UnboundedSource.CheckpointMark.NoopCheckpointMark.html" title="class in org.apache.beam.sdk.io"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/beam/sdk/io/WriteFiles.html" title="class in org.apache.beam.sdk.io"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/beam/sdk/io/UnboundedSource.UnboundedReader.html" target="_top">Frames</a></li>
<li><a href="UnboundedSource.UnboundedReader.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>