| <!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 Mon Jan 27 16:42:32 PST 2020 --> |
| <title>FileBasedSink.WriteOperation (Apache Beam 2.20.0-SNAPSHOT)</title> |
| <meta name="date" content="2020-01-27"> |
| <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="FileBasedSink.WriteOperation (Apache Beam 2.20.0-SNAPSHOT)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":6,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static 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.WritableByteChannelFactory.html" title="interface in org.apache.beam.sdk.io"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.Writer.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/FileBasedSink.WriteOperation.html" target="_top">Frames</a></li> |
| <li><a href="FileBasedSink.WriteOperation.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>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </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><a href="#field.detail">Field</a> | </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 FileBasedSink.WriteOperation" class="title">Class FileBasedSink.WriteOperation<DestinationT,OutputT></h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.beam.sdk.io.FileBasedSink.WriteOperation<DestinationT,OutputT></li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>OutputT</code> - the type of values written to the sink.</dd> |
| </dl> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd>java.io.Serializable</dd> |
| </dl> |
| <dl> |
| <dt>Enclosing class:</dt> |
| <dd><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.html" title="class in org.apache.beam.sdk.io">FileBasedSink</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.html" title="type parameter in FileBasedSink">UserT</a>,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.html" title="type parameter in FileBasedSink">DestinationT</a>,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.html" title="type parameter in FileBasedSink">OutputT</a>></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public abstract static class <span class="typeNameLabel">FileBasedSink.WriteOperation<DestinationT,OutputT></span> |
| extends java.lang.Object |
| implements java.io.Serializable</pre> |
| <div class="block">Abstract operation that manages the process of writing to <a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.html" title="class in org.apache.beam.sdk.io"><code>FileBasedSink</code></a>. |
| |
| <p>The primary responsibilities of the WriteOperation is the management of output files. During |
| a write, <a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.Writer.html" title="class in org.apache.beam.sdk.io"><code>FileBasedSink.Writer</code></a>s write bundles to temporary file locations. After the bundles have been |
| written, |
| |
| <ol> |
| <li><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html#finalizeDestination-DestinationT-org.apache.beam.sdk.transforms.windowing.BoundedWindow-java.lang.Integer-java.util.Collection-"><code>finalizeDestination(DestinationT, org.apache.beam.sdk.transforms.windowing.BoundedWindow, java.lang.Integer, java.util.Collection<org.apache.beam.sdk.io.FileBasedSink.FileResult<DestinationT>>)</code></a> is given a list of the temporary files |
| containing the output bundles. |
| <li>During finalize, these temporary files are copied to final output locations and named |
| according to a file naming template. |
| <li>Finally, any temporary files that were created during the write are removed. |
| </ol> |
| |
| <p>Subclass implementations of WriteOperation must implement <a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html#createWriter--"><code>createWriter()</code></a> to return a concrete FileBasedSinkWriter. |
| |
| <h2>Temporary and Output File Naming:</h2> |
| |
| <p>During the write, bundles are written to temporary files using the tempDirectory that can be |
| provided via the constructor of WriteOperation. These temporary files will be named <code>{tempDirectory}/{bundleId}</code>, where bundleId is the unique id of the bundle. For example, if |
| tempDirectory is "gs://my-bucket/my_temp_output", the output for a bundle with bundle id 15723 |
| will be "gs://my-bucket/my_temp_output/15723". |
| |
| <p>Final output files are written to the location specified by the <a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.FilenamePolicy.html" title="class in org.apache.beam.sdk.io"><code>FileBasedSink.FilenamePolicy</code></a>. If |
| no filename policy is specified, then the <a href="../../../../../org/apache/beam/sdk/io/DefaultFilenamePolicy.html" title="class in org.apache.beam.sdk.io"><code>DefaultFilenamePolicy</code></a> will be used. The |
| directory that the files are written to is determined by the <a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.FilenamePolicy.html" title="class in org.apache.beam.sdk.io"><code>FileBasedSink.FilenamePolicy</code></a> instance. |
| |
| <p>Note that in the case of permanent failure of a bundle's write, no clean up of temporary |
| files will occur. |
| |
| <p>If there are no elements in the PCollection being written, no output will be generated.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../serialized-form.html#org.apache.beam.sdk.io.FileBasedSink.WriteOperation">Serialized Form</a></dd> |
| </dl> |
| </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"> </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>protected <a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.html" title="class in org.apache.beam.sdk.io">FileBasedSink</a><?,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">DestinationT</a>,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">OutputT</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html#sink">sink</a></span></code> |
| <div class="block">The Sink that this WriteOperation will write to.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../org/apache/beam/sdk/options/ValueProvider.html" title="interface in org.apache.beam.sdk.options">ValueProvider</a><<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html#tempDirectory">tempDirectory</a></span></code> |
| <div class="block">Directory for temporary output files.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html#windowedWrites">windowedWrites</a></span></code> |
| <div class="block">Whether windowed writes are being used.</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"> </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/FileBasedSink.WriteOperation.html#WriteOperation-org.apache.beam.sdk.io.FileBasedSink-">WriteOperation</a></span>(<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.html" title="class in org.apache.beam.sdk.io">FileBasedSink</a><?,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">DestinationT</a>,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">OutputT</a>> sink)</code> |
| <div class="block">Constructs a WriteOperation using the default strategy for generating a temporary directory |
| from the base output filename.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html#WriteOperation-org.apache.beam.sdk.io.FileBasedSink-org.apache.beam.sdk.io.fs.ResourceId-">WriteOperation</a></span>(<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.html" title="class in org.apache.beam.sdk.io">FileBasedSink</a><?,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">DestinationT</a>,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">OutputT</a>> sink, |
| <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a> tempDirectory)</code> |
| <div class="block">Create a new WriteOperation.</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="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></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 static <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html#buildTemporaryFilename-org.apache.beam.sdk.io.fs.ResourceId-java.lang.String-">buildTemporaryFilename</a></span>(<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a> tempDirectory, |
| java.lang.String filename)</code> |
| <div class="block">Constructs a temporary file resource given the temporary directory and a filename.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>abstract <a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.Writer.html" title="class in org.apache.beam.sdk.io">FileBasedSink.Writer</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">DestinationT</a>,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">OutputT</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html#createWriter--">createWriter</a></span>()</code> |
| <div class="block">Clients must implement to return a subclass of <a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.Writer.html" title="class in org.apache.beam.sdk.io"><code>FileBasedSink.Writer</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>protected java.util.List<<a href="../../../../../org/apache/beam/sdk/values/KV.html" title="class in org.apache.beam.sdk.values">KV</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.FileResult.html" title="class in org.apache.beam.sdk.io">FileBasedSink.FileResult</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">DestinationT</a>>,<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html#finalizeDestination-DestinationT-org.apache.beam.sdk.transforms.windowing.BoundedWindow-java.lang.Integer-java.util.Collection-">finalizeDestination</a></span>(<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">DestinationT</a> dest, |
| <a href="../../../../../org/apache/beam/sdk/transforms/windowing/BoundedWindow.html" title="class in org.apache.beam.sdk.transforms.windowing">BoundedWindow</a> window, |
| java.lang.Integer numShards, |
| java.util.Collection<<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.FileResult.html" title="class in org.apache.beam.sdk.io">FileBasedSink.FileResult</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">DestinationT</a>>> existingResults)</code> </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.html" title="class in org.apache.beam.sdk.io">FileBasedSink</a><?,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">DestinationT</a>,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">OutputT</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html#getSink--">getSink</a></span>()</code> |
| <div class="block">Returns the FileBasedSink for this write operation.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html#removeTemporaryFiles-java.util.Collection-">removeTemporaryFiles</a></span>(java.util.Collection<<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>> filenames)</code> </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html#setWindowedWrites-boolean-">setWindowedWrites</a></span>(boolean windowedWrites)</code> |
| <div class="block">Indicates that the operation will be performing windowed writes.</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/FileBasedSink.WriteOperation.html#toString--">toString</a></span>()</code> </td> |
| </tr> |
| </table> |
| <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"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="sink"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sink</h4> |
| <pre>protected final <a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.html" title="class in org.apache.beam.sdk.io">FileBasedSink</a><?,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">DestinationT</a>,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">OutputT</a>> sink</pre> |
| <div class="block">The Sink that this WriteOperation will write to.</div> |
| </li> |
| </ul> |
| <a name="tempDirectory"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>tempDirectory</h4> |
| <pre>protected final <a href="../../../../../org/apache/beam/sdk/options/ValueProvider.html" title="interface in org.apache.beam.sdk.options">ValueProvider</a><<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>> tempDirectory</pre> |
| <div class="block">Directory for temporary output files.</div> |
| </li> |
| </ul> |
| <a name="windowedWrites"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>windowedWrites</h4> |
| <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#FILESYSTEM">FILESYSTEM</a>) |
| protected boolean windowedWrites</pre> |
| <div class="block">Whether windowed writes are being used.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="WriteOperation-org.apache.beam.sdk.io.FileBasedSink-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>WriteOperation</h4> |
| <pre>public WriteOperation(<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.html" title="class in org.apache.beam.sdk.io">FileBasedSink</a><?,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">DestinationT</a>,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">OutputT</a>> sink)</pre> |
| <div class="block">Constructs a WriteOperation using the default strategy for generating a temporary directory |
| from the base output filename. |
| |
| <p>Default is a uniquely named subdirectory of the provided tempDirectory, e.g. if |
| tempDirectory is /path/to/foo/, the temporary directory will be |
| /path/to/foo/.temp-beam-$uuid.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>sink</code> - the FileBasedSink that will be used to configure this write operation.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="WriteOperation-org.apache.beam.sdk.io.FileBasedSink-org.apache.beam.sdk.io.fs.ResourceId-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>WriteOperation</h4> |
| <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#FILESYSTEM">FILESYSTEM</a>) |
| public WriteOperation(<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.html" title="class in org.apache.beam.sdk.io">FileBasedSink</a><?,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">DestinationT</a>,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">OutputT</a>> sink, |
| <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a> tempDirectory)</pre> |
| <div class="block">Create a new WriteOperation.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>sink</code> - the FileBasedSink that will be used to configure this write operation.</dd> |
| <dd><code>tempDirectory</code> - the base directory to be used for temporary output files.</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="buildTemporaryFilename-org.apache.beam.sdk.io.fs.ResourceId-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>buildTemporaryFilename</h4> |
| <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#FILESYSTEM">FILESYSTEM</a>) |
| protected static <a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a> buildTemporaryFilename(<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a> tempDirectory, |
| java.lang.String filename) |
| throws java.io.IOException</pre> |
| <div class="block">Constructs a temporary file resource given the temporary directory and a filename.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createWriter--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createWriter</h4> |
| <pre>public abstract <a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.Writer.html" title="class in org.apache.beam.sdk.io">FileBasedSink.Writer</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">DestinationT</a>,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">OutputT</a>> createWriter() |
| throws java.lang.Exception</pre> |
| <div class="block">Clients must implement to return a subclass of <a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.Writer.html" title="class in org.apache.beam.sdk.io"><code>FileBasedSink.Writer</code></a>. This method must not mutate |
| the state of the object.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.Exception</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setWindowedWrites-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setWindowedWrites</h4> |
| <pre>public void setWindowedWrites(boolean windowedWrites)</pre> |
| <div class="block">Indicates that the operation will be performing windowed writes.</div> |
| </li> |
| </ul> |
| <a name="removeTemporaryFiles-java.util.Collection-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>removeTemporaryFiles</h4> |
| <pre>public void removeTemporaryFiles(java.util.Collection<<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>> filenames) |
| throws java.io.IOException</pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="finalizeDestination-java.lang.Object-org.apache.beam.sdk.transforms.windowing.BoundedWindow-java.lang.Integer-java.util.Collection-"> |
| <!-- --> |
| </a><a name="finalizeDestination-DestinationT-org.apache.beam.sdk.transforms.windowing.BoundedWindow-java.lang.Integer-java.util.Collection-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>finalizeDestination</h4> |
| <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#FILESYSTEM">FILESYSTEM</a>) |
| protected final java.util.List<<a href="../../../../../org/apache/beam/sdk/values/KV.html" title="class in org.apache.beam.sdk.values">KV</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.FileResult.html" title="class in org.apache.beam.sdk.io">FileBasedSink.FileResult</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">DestinationT</a>>,<a href="../../../../../org/apache/beam/sdk/io/fs/ResourceId.html" title="interface in org.apache.beam.sdk.io.fs">ResourceId</a>>> finalizeDestination(<a href="https://static.javadoc.io/com.google.code.findbugs/jsr305/3.0.2/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation">@Nullable</a> |
| <a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">DestinationT</a> dest, |
| <a href="https://static.javadoc.io/com.google.code.findbugs/jsr305/3.0.2/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation">@Nullable</a> |
| <a href="../../../../../org/apache/beam/sdk/transforms/windowing/BoundedWindow.html" title="class in org.apache.beam.sdk.transforms.windowing">BoundedWindow</a> window, |
| <a href="https://static.javadoc.io/com.google.code.findbugs/jsr305/3.0.2/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation">@Nullable</a> |
| java.lang.Integer numShards, |
| java.util.Collection<<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.FileResult.html" title="class in org.apache.beam.sdk.io">FileBasedSink.FileResult</a><<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">DestinationT</a>>> existingResults) |
| throws java.lang.Exception</pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.Exception</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getSink--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSink</h4> |
| <pre>public <a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.html" title="class in org.apache.beam.sdk.io">FileBasedSink</a><?,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">DestinationT</a>,<a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.WriteOperation.html" title="type parameter in FileBasedSink.WriteOperation">OutputT</a>> getSink()</pre> |
| <div class="block">Returns the FileBasedSink for this write operation.</div> |
| </li> |
| </ul> |
| <a name="toString--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre>public java.lang.String toString()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code>toString</code> in class <code>java.lang.Object</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.WritableByteChannelFactory.html" title="interface in org.apache.beam.sdk.io"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/beam/sdk/io/FileBasedSink.Writer.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/FileBasedSink.WriteOperation.html" target="_top">Frames</a></li> |
| <li><a href="FileBasedSink.WriteOperation.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>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </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><a href="#field.detail">Field</a> | </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> |