| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> |
| <title>AsyncKuduScanner (Kudu 0.7.1 API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="AsyncKuduScanner (Kudu 0.7.1 API)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><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="class-use/AsyncKuduScanner.html">Use</a></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/kududb/client/AsyncKuduClient.html" title="class in org.kududb.client"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../org/kududb/client/AsyncKuduScanner.ReadMode.html" title="enum in org.kududb.client"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?org/kududb/client/AsyncKuduScanner.html" target="_top">Frames</a></li> |
| <li><a href="AsyncKuduScanner.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>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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.kududb.client</div> |
| <h2 title="Class AsyncKuduScanner" class="title">Class AsyncKuduScanner</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.kududb.client.AsyncKuduScanner</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>@InterfaceAudience.Public |
| @InterfaceStability.Unstable |
| public final class <span class="strong">AsyncKuduScanner</span> |
| extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
| <div class="block">Creates a scanner to read data from Kudu. |
| <p> |
| This class is <strong>not synchronized</strong> as it's expected to be |
| used from a single thread at a time. It's rarely (if ever?) useful to |
| scan concurrently from a shared scanner using multiple threads. If you |
| want to optimize large table scans using extra parallelism, create a few |
| scanners and give each of them a partition of the table to scan. Or use |
| MapReduce. |
| <p> |
| There's no method in this class to explicitly open the scanner. It will open |
| itself automatically when you start scanning by calling <a href="../../../org/kududb/client/AsyncKuduScanner.html#nextRows()"><code>nextRows()</code></a>. |
| Also, the scanner will automatically call <a href="../../../org/kududb/client/AsyncKuduScanner.html#close()"><code>close()</code></a> when it reaches the |
| end key. If, however, you would like to stop scanning <i>before reaching the |
| end key</i>, you <b>must</b> call <a href="../../../org/kududb/client/AsyncKuduScanner.html#close()"><code>close()</code></a> before disposing of the scanner. |
| Note that it's always safe to call <a href="../../../org/kududb/client/AsyncKuduScanner.html#close()"><code>close()</code></a> on a scanner. |
| <p> |
| A <code>AsyncKuduScanner</code> is not re-usable. Should you want to scan the same rows |
| or the same table again, you must create a new one. |
| |
| <h1>A note on passing <code>byte</code> arrays in argument</h1> |
| None of the method that receive a <code>byte[]</code> in argument will copy it. |
| For more info, please refer to the documentation of <code>KuduRpc</code>. |
| <h1>A note on passing <code>String</code>s in argument</h1> |
| All strings are assumed to use the platform's default charset.</div> |
| </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="overviewSummary" 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><strong><a href="../../../org/kududb/client/AsyncKuduScanner.ReadMode.html" title="enum in org.kududb.client">AsyncKuduScanner.ReadMode</a></strong></code> |
| <div class="block">The possible read modes for scanners.</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>com.stumbleupon.async.Deferred<<a href="../../../org/kududb/client/RowResultIterator.html" title="class in org.kududb.client">RowResultIterator</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/kududb/client/AsyncKuduScanner.html#close()">close</a></strong>()</code> |
| <div class="block">Closes this scanner (don't forget to call this when you're done with it!).</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../org/kududb/client/AsyncKuduScanner.html#getBatchSizeBytes()">getBatchSizeBytes</a></strong>()</code> |
| <div class="block">Returns the maximum number of bytes returned by the scanner, on each batch.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../org/kududb/client/AsyncKuduScanner.html#getCacheBlocks()">getCacheBlocks</a></strong>()</code> |
| <div class="block">Returns if this scanner was configured to cache data blocks or not.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../org/kududb/client/AsyncKuduScanner.html#getLimit()">getLimit</a></strong>()</code> |
| <div class="block">Returns the maximum number of rows that this scanner was configured to return.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../org/kududb/Schema.html" title="class in org.kududb">Schema</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/kududb/client/AsyncKuduScanner.html#getProjectionSchema()">getProjectionSchema</a></strong>()</code> |
| <div class="block">Returns the projection schema of this scanner.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../org/kududb/client/AsyncKuduScanner.ReadMode.html" title="enum in org.kududb.client">AsyncKuduScanner.ReadMode</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/kududb/client/AsyncKuduScanner.html#getReadMode()">getReadMode</a></strong>()</code> |
| <div class="block">Returns the ReadMode for this scanner.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../org/kududb/client/AsyncKuduScanner.html#hasMoreRows()">hasMoreRows</a></strong>()</code> |
| <div class="block">Tells if the last rpc returned that there might be more rows to scan.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>com.stumbleupon.async.Deferred<<a href="../../../org/kududb/client/RowResultIterator.html" title="class in org.kududb.client">RowResultIterator</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/kududb/client/AsyncKuduScanner.html#nextRows()">nextRows</a></strong>()</code> |
| <div class="block">Scans a number of rows.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/kududb/client/AsyncKuduScanner.html#toString()">toString</a></strong>()</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.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getLimit()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLimit</h4> |
| <pre>public long getLimit()</pre> |
| <div class="block">Returns the maximum number of rows that this scanner was configured to return.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>a long representing the maximum number of rows that can be returned</dd></dl> |
| </li> |
| </ul> |
| <a name="hasMoreRows()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hasMoreRows</h4> |
| <pre>public boolean hasMoreRows()</pre> |
| <div class="block">Tells if the last rpc returned that there might be more rows to scan.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>true if there might be more data to scan, else false</dd></dl> |
| </li> |
| </ul> |
| <a name="getCacheBlocks()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCacheBlocks</h4> |
| <pre>public boolean getCacheBlocks()</pre> |
| <div class="block">Returns if this scanner was configured to cache data blocks or not.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>true if this scanner will cache blocks, else else.</dd></dl> |
| </li> |
| </ul> |
| <a name="getBatchSizeBytes()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getBatchSizeBytes</h4> |
| <pre>public long getBatchSizeBytes()</pre> |
| <div class="block">Returns the maximum number of bytes returned by the scanner, on each batch.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>a long representing the maximum number of bytes that a scanner can receive at once |
| from a tablet server</dd></dl> |
| </li> |
| </ul> |
| <a name="getReadMode()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getReadMode</h4> |
| <pre>public <a href="../../../org/kududb/client/AsyncKuduScanner.ReadMode.html" title="enum in org.kududb.client">AsyncKuduScanner.ReadMode</a> getReadMode()</pre> |
| <div class="block">Returns the ReadMode for this scanner.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the configured read mode for this scanner</dd></dl> |
| </li> |
| </ul> |
| <a name="getProjectionSchema()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getProjectionSchema</h4> |
| <pre>public <a href="../../../org/kududb/Schema.html" title="class in org.kududb">Schema</a> getProjectionSchema()</pre> |
| <div class="block">Returns the projection schema of this scanner. If specific columns were |
| not specified during scanner creation, the table schema is returned.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the projection schema for this scanner</dd></dl> |
| </li> |
| </ul> |
| <a name="nextRows()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>nextRows</h4> |
| <pre>public com.stumbleupon.async.Deferred<<a href="../../../org/kududb/client/RowResultIterator.html" title="class in org.kududb.client">RowResultIterator</a>> nextRows()</pre> |
| <div class="block">Scans a number of rows. |
| <p> |
| Once this method returns <code>null</code> once (which indicates that this |
| <code>Scanner</code> is done scanning), calling it again leads to an undefined |
| behavior.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>a deferred list of rows.</dd></dl> |
| </li> |
| </ul> |
| <a name="close()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>close</h4> |
| <pre>public com.stumbleupon.async.Deferred<<a href="../../../org/kududb/client/RowResultIterator.html" title="class in org.kududb.client">RowResultIterator</a>> close()</pre> |
| <div class="block">Closes this scanner (don't forget to call this when you're done with it!). |
| <p> |
| Closing a scanner already closed has no effect. The deferred returned |
| will be called back immediately.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>A deferred object that indicates the completion of the request. |
| The <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><code>Object</code></a> can be null, a RowResultIterator if there was data left |
| in the scanner, or an Exception.</dd></dl> |
| </li> |
| </ul> |
| <a name="toString()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toString()</pre> |
| <dl> |
| <dt><strong>Overrides:</strong></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a></code> in class <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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="class-use/AsyncKuduScanner.html">Use</a></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/kududb/client/AsyncKuduClient.html" title="class in org.kududb.client"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../org/kududb/client/AsyncKuduScanner.ReadMode.html" title="enum in org.kududb.client"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?org/kududb/client/AsyncKuduScanner.html" target="_top">Frames</a></li> |
| <li><a href="AsyncKuduScanner.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>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2016. All rights reserved.</small></p> |
| </body> |
| </html> |