| <!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>DoFn.TruncateRestriction (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="DoFn.TruncateRestriction (Apache Beam 2.38.0-SNAPSHOT)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| </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/transforms/DoFn.Timestamp.html" title="annotation in org.apache.beam.sdk.transforms"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/beam/sdk/transforms/DoFn.UnboundedPerElement.html" title="annotation in org.apache.beam.sdk.transforms"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/beam/sdk/transforms/DoFn.TruncateRestriction.html" target="_top">Frames</a></li> |
| <li><a href="DoFn.TruncateRestriction.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>Field | </li> |
| <li>Required | </li> |
| <li>Optional</li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Element</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.transforms</div> |
| <h2 title="Annotation Type DoFn.TruncateRestriction" class="title">Annotation Type DoFn.TruncateRestriction</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>@Documented |
| @Retention(value=RUNTIME) |
| @Target(value=METHOD) |
| public static @interface <span class="memberNameLabel">DoFn.TruncateRestriction</span></pre> |
| <div class="block">Annotation for the method that truncates the restriction of a <a |
| href="https://s.apache.org/splittable-do-fn">splittable</a> <a href="../../../../../org/apache/beam/sdk/transforms/DoFn.html" title="class in org.apache.beam.sdk.transforms"><code>DoFn</code></a> into a bounded one. |
| This method is invoked when a pipeline is being <a |
| href="https://docs.google.com/document/d/1NExwHlj-2q2WUGhSO4jTu8XGhDPmm3cllSN8IMmWci8/edit#">drained</a>. |
| |
| <p>This method is used to perform truncation of the restriction while it is not actively being |
| processed. |
| |
| <p>Signature: <code>@Nullable TruncateResult<RestrictionT> truncateRestriction(<arguments>);</code> |
| |
| <p>This method must satisfy the following constraints: |
| |
| <ul> |
| <li>If one of its arguments is tagged with the <a href="../../../../../org/apache/beam/sdk/transforms/DoFn.Element.html" title="annotation in org.apache.beam.sdk.transforms"><code>DoFn.Element</code></a> annotation, then it will be |
| passed the current element being processed; the argument must be of type <code>InputT</code>. |
| Note that automatic conversion of <a href="../../../../../org/apache/beam/sdk/values/Row.html" title="class in org.apache.beam.sdk.values"><code>Row</code></a>s and <a href="../../../../../org/apache/beam/sdk/transforms/DoFn.FieldAccess.html" title="annotation in org.apache.beam.sdk.transforms"><code>DoFn.FieldAccess</code></a> parameters are |
| currently unsupported. |
| <li>If one of its arguments is tagged with the <a href="../../../../../org/apache/beam/sdk/transforms/DoFn.Restriction.html" title="annotation in org.apache.beam.sdk.transforms"><code>DoFn.Restriction</code></a> annotation, then it will |
| be passed the current restriction being processed; the argument must be of type <code>RestrictionT</code>. |
| <li>If one of its arguments is tagged with the <a href="../../../../../org/apache/beam/sdk/transforms/DoFn.Timestamp.html" title="annotation in org.apache.beam.sdk.transforms"><code>DoFn.Timestamp</code></a> annotation, then it will be |
| passed the timestamp of the current element being processed; the argument must be of type |
| <a href="https://static.javadoc.io/joda-time/joda-time/2.10.10/org/joda/time/Instant.html?is-external=true" title="class or interface in org.joda.time"><code>Instant</code></a>. |
| <li>If one of its arguments is a <a href="../../../../../org/apache/beam/sdk/transforms/splittabledofn/RestrictionTracker.html" title="class in org.apache.beam.sdk.transforms.splittabledofn"><code>RestrictionTracker</code></a>, then it will be passed a tracker |
| that is initialized for the current <a href="../../../../../org/apache/beam/sdk/transforms/DoFn.Restriction.html" title="annotation in org.apache.beam.sdk.transforms"><code>DoFn.Restriction</code></a>. The argument must be of the |
| exact type <code>RestrictionTracker<RestrictionT, PositionT></code>. |
| <li>If one of its arguments is a subtype of <a href="../../../../../org/apache/beam/sdk/transforms/windowing/BoundedWindow.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>BoundedWindow</code></a>, then it will be passed the |
| window of the current element. When applied by <a href="../../../../../org/apache/beam/sdk/transforms/ParDo.html" title="class in org.apache.beam.sdk.transforms"><code>ParDo</code></a> the subtype of <a href="../../../../../org/apache/beam/sdk/transforms/windowing/BoundedWindow.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>BoundedWindow</code></a> must match the type of windows on the input <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a>. If the |
| window is not accessed a runner may perform additional optimizations. |
| <li>If one of its arguments is of type <a href="../../../../../org/apache/beam/sdk/transforms/windowing/PaneInfo.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>PaneInfo</code></a>, then it will be passed information |
| about the current triggering pane. |
| <li>If one of the parameters is of type <a href="../../../../../org/apache/beam/sdk/options/PipelineOptions.html" title="interface in org.apache.beam.sdk.options"><code>PipelineOptions</code></a>, then it will be passed the |
| options for the current pipeline. |
| </ul> |
| |
| <p>Returns a truncated restriction representing a bounded amount of work that must be processed |
| before the pipeline can be drained or <code>null</code> if no work is necessary. |
| |
| <p>The default behavior when a pipeline is being drained is that <a href="../../../../../org/apache/beam/sdk/transforms/splittabledofn/RestrictionTracker.IsBounded.html#BOUNDED"><code>RestrictionTracker.IsBounded.BOUNDED</code></a> |
| restrictions process entirely while <a href="../../../../../org/apache/beam/sdk/transforms/splittabledofn/RestrictionTracker.IsBounded.html#UNBOUNDED"><code>RestrictionTracker.IsBounded.UNBOUNDED</code></a> |
| restrictions process till a checkpoint is possible. Splittable <a href="../../../../../org/apache/beam/sdk/transforms/DoFn.html" title="class in org.apache.beam.sdk.transforms"><code>DoFn</code></a>s should only |
| provide this method if they want to change this default behavior.</div> |
| </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/transforms/DoFn.Timestamp.html" title="annotation in org.apache.beam.sdk.transforms"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/beam/sdk/transforms/DoFn.UnboundedPerElement.html" title="annotation in org.apache.beam.sdk.transforms"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/beam/sdk/transforms/DoFn.TruncateRestriction.html" target="_top">Frames</a></li> |
| <li><a href="DoFn.TruncateRestriction.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>Field | </li> |
| <li>Required | </li> |
| <li>Optional</li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Element</li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |