| <!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_292) on Tue Jun 15 06:01:50 GMT 2021 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>RemoteIterators (Apache Hadoop Common 3.3.1 API)</title> |
| <meta name="date" content="2021-06-15"> |
| <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="RemoteIterators (Apache Hadoop Common 3.3.1 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static 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="class-use/RemoteIterators.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/apache/hadoop/util/functional/InvocationRaisingIOE.html" title="interface in org.apache.hadoop.util.functional"><span class="typeNameLink">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/hadoop/util/functional/RemoteIterators.html" target="_top">Frames</a></li> |
| <li><a href="RemoteIterators.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>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.apache.hadoop.util.functional</div> |
| <h2 title="Class RemoteIterators" class="title">Class RemoteIterators</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/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.apache.hadoop.util.functional.RemoteIterators</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="typeNameLabel">RemoteIterators</span> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
| <div class="block">A set of remote iterators supporting transformation and filtering, |
| with IOStatisticsSource passthrough, and of conversions of |
| the iterators to lists/arrays and of performing actions |
| on the values. |
| <p></p> |
| This aims to make it straightforward to use lambda-expressions to |
| transform the results of an iterator, without losing the statistics |
| in the process, and to chain the operations together. |
| <p></p> |
| The closeable operation will be passed through RemoteIterators which |
| wrap other RemoteIterators. This is to support any iterator which |
| can be closed to release held connections, file handles etc. |
| Unless client code is written to assume that RemoteIterator instances |
| may be closed, this is not likely to be broadly used. It is added |
| to make it possible to adopt this feature in a managed way. |
| <p></p> |
| One notable feature is that the |
| <a href="../../../../../org/apache/hadoop/util/functional/RemoteIterators.html#foreach-org.apache.hadoop.fs.RemoteIterator-org.apache.hadoop.util.functional.ConsumerRaisingIOE-"><code>foreach(RemoteIterator, ConsumerRaisingIOE)</code></a> method will |
| LOG at debug any IOStatistics provided by the iterator, if such |
| statistics are provided. There's no attempt at retrieval and logging |
| if the LOG is not set to debug, so it is a zero cost feature unless |
| the logger <code>org.apache.hadoop.fs.functional.RemoteIterators</code> |
| is at DEBUG. |
| <p></p> |
| Based on the S3A Listing code, and some some work on moving other code |
| to using iterative listings so as to pick up the statistics.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== 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="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>static <S> <a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><S></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/util/functional/RemoteIterators.html#closingRemoteIterator-org.apache.hadoop.fs.RemoteIterator-java.io.Closeable-">closingRemoteIterator</a></span>(<a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><S> iterator, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a> toClose)</code> |
| <div class="block">This adds an extra close operation alongside the passthrough |
| to any Closeable.close() method supported by the source iterator.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static <S> <a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><S></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/util/functional/RemoteIterators.html#filteringRemoteIterator-org.apache.hadoop.fs.RemoteIterator-org.apache.hadoop.util.functional.FunctionRaisingIOE-">filteringRemoteIterator</a></span>(<a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><S> iterator, |
| <a href="../../../../../org/apache/hadoop/util/functional/FunctionRaisingIOE.html" title="interface in org.apache.hadoop.util.functional">FunctionRaisingIOE</a><? super S,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a>> filter)</code> |
| <div class="block">Create a RemoteIterator from a RemoteIterator and a filter |
| function which returns true for every element to be passed |
| through.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static <T> long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/util/functional/RemoteIterators.html#foreach-org.apache.hadoop.fs.RemoteIterator-org.apache.hadoop.util.functional.ConsumerRaisingIOE-">foreach</a></span>(<a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T> source, |
| <a href="../../../../../org/apache/hadoop/util/functional/ConsumerRaisingIOE.html" title="interface in org.apache.hadoop.util.functional">ConsumerRaisingIOE</a><? super T> consumer)</code> |
| <div class="block">Apply an operation to all values of a RemoteIterator.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static <S,T> <a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/util/functional/RemoteIterators.html#mappingRemoteIterator-org.apache.hadoop.fs.RemoteIterator-org.apache.hadoop.util.functional.FunctionRaisingIOE-">mappingRemoteIterator</a></span>(<a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><S> iterator, |
| <a href="../../../../../org/apache/hadoop/util/functional/FunctionRaisingIOE.html" title="interface in org.apache.hadoop.util.functional">FunctionRaisingIOE</a><? super S,T> mapper)</code> |
| <div class="block">Create an iterator from an iterator and a transformation function.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <T> <a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/util/functional/RemoteIterators.html#remoteIteratorFromArray-T:A-">remoteIteratorFromArray</a></span>(T[] array)</code> |
| <div class="block">Create a remote iterator from an array.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <T> <a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/util/functional/RemoteIterators.html#remoteIteratorFromIterable-java.lang.Iterable-">remoteIteratorFromIterable</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><T> iterable)</code> |
| <div class="block">Create a remote iterator from a java.util.Iterable -e.g.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static <T> <a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/util/functional/RemoteIterators.html#remoteIteratorFromIterator-java.util.Iterator-">remoteIteratorFromIterator</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a><T> iterator)</code> |
| <div class="block">Create a remote iterator from a java.util.Iterator.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static <T> <a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/util/functional/RemoteIterators.html#remoteIteratorFromSingleton-T-">remoteIteratorFromSingleton</a></span>(T singleton)</code> |
| <div class="block">Create an iterator from a singleton.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static <T> T[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/util/functional/RemoteIterators.html#toArray-org.apache.hadoop.fs.RemoteIterator-">toArray</a></span>(<a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T> source)</code> |
| <div class="block">Build an array from a RemoteIterator.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><T></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/util/functional/RemoteIterators.html#toList-org.apache.hadoop.fs.RemoteIterator-">toList</a></span>(<a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T> source)</code> |
| <div class="block">Build a list from a RemoteIterator.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static <S,T> <a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/util/functional/RemoteIterators.html#typeCastingRemoteIterator-org.apache.hadoop.fs.RemoteIterator-">typeCastingRemoteIterator</a></span>(<a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><S> iterator)</code> |
| <div class="block">Create a RemoteIterator from a RemoteIterator, casting the |
| type in the process.</div> |
| </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="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" 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="remoteIteratorFromSingleton-java.lang.Object-"> |
| <!-- --> |
| </a><a name="remoteIteratorFromSingleton-T-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>remoteIteratorFromSingleton</h4> |
| <pre>public static <T> <a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T> remoteIteratorFromSingleton(<a href="https://docs.oracle.com/javase/8/docs/api/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation">@Nullable</a> |
| T singleton)</pre> |
| <div class="block">Create an iterator from a singleton.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - type</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>singleton</code> - instance</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a remote iterator</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="remoteIteratorFromIterator-java.util.Iterator-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>remoteIteratorFromIterator</h4> |
| <pre>public static <T> <a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T> remoteIteratorFromIterator(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a><T> iterator)</pre> |
| <div class="block">Create a remote iterator from a java.util.Iterator.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - type</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a remote iterator</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="remoteIteratorFromIterable-java.lang.Iterable-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>remoteIteratorFromIterable</h4> |
| <pre>public static <T> <a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T> remoteIteratorFromIterable(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><T> iterable)</pre> |
| <div class="block">Create a remote iterator from a java.util.Iterable -e.g. a list |
| or other collection.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - type</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a remote iterator</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="remoteIteratorFromArray-java.lang.Object:A-"> |
| <!-- --> |
| </a><a name="remoteIteratorFromArray-T:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>remoteIteratorFromArray</h4> |
| <pre>public static <T> <a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T> remoteIteratorFromArray(T[] array)</pre> |
| <div class="block">Create a remote iterator from an array.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - type</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a remote iterator</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="mappingRemoteIterator-org.apache.hadoop.fs.RemoteIterator-org.apache.hadoop.util.functional.FunctionRaisingIOE-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mappingRemoteIterator</h4> |
| <pre>public static <S,T> <a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T> mappingRemoteIterator(<a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><S> iterator, |
| <a href="../../../../../org/apache/hadoop/util/functional/FunctionRaisingIOE.html" title="interface in org.apache.hadoop.util.functional">FunctionRaisingIOE</a><? super S,T> mapper)</pre> |
| <div class="block">Create an iterator from an iterator and a transformation function.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>S</code> - source type</dd> |
| <dd><code>T</code> - result type</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>iterator</code> - source</dd> |
| <dd><code>mapper</code> - transformation</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a remote iterator</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="typeCastingRemoteIterator-org.apache.hadoop.fs.RemoteIterator-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>typeCastingRemoteIterator</h4> |
| <pre>public static <S,T> <a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T> typeCastingRemoteIterator(<a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><S> iterator)</pre> |
| <div class="block">Create a RemoteIterator from a RemoteIterator, casting the |
| type in the process. This is to help with filesystem API |
| calls where overloading causes confusion (e.g. listStatusIterator())</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>S</code> - source type</dd> |
| <dd><code>T</code> - result type</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>iterator</code> - source</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a remote iterator</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="filteringRemoteIterator-org.apache.hadoop.fs.RemoteIterator-org.apache.hadoop.util.functional.FunctionRaisingIOE-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>filteringRemoteIterator</h4> |
| <pre>public static <S> <a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><S> filteringRemoteIterator(<a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><S> iterator, |
| <a href="../../../../../org/apache/hadoop/util/functional/FunctionRaisingIOE.html" title="interface in org.apache.hadoop.util.functional">FunctionRaisingIOE</a><? super S,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a>> filter)</pre> |
| <div class="block">Create a RemoteIterator from a RemoteIterator and a filter |
| function which returns true for every element to be passed |
| through. |
| <p></p> |
| Elements are filtered in the hasNext() method; if not used |
| the filtering will be done on demand in the <code>next()</code> |
| call.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>S</code> - type</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>iterator</code> - source</dd> |
| <dd><code>filter</code> - filter</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a remote iterator</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="closingRemoteIterator-org.apache.hadoop.fs.RemoteIterator-java.io.Closeable-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>closingRemoteIterator</h4> |
| <pre>public static <S> <a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><S> closingRemoteIterator(<a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><S> iterator, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a> toClose)</pre> |
| <div class="block">This adds an extra close operation alongside the passthrough |
| to any Closeable.close() method supported by the source iterator.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>S</code> - source type.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>iterator</code> - source</dd> |
| <dd><code>toClose</code> - extra object to close.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new iterator</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toList-org.apache.hadoop.fs.RemoteIterator-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toList</h4> |
| <pre>public static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><T> toList(<a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T> source) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Build a list from a RemoteIterator.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - type</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a list of the values.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the source RemoteIterator raises it.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toArray-org.apache.hadoop.fs.RemoteIterator-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toArray</h4> |
| <pre>public static <T> T[] toArray(<a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T> source) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Build an array from a RemoteIterator.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - type</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an array of the values.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the source RemoteIterator raises it.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="foreach-org.apache.hadoop.fs.RemoteIterator-org.apache.hadoop.util.functional.ConsumerRaisingIOE-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>foreach</h4> |
| <pre>public static <T> long foreach(<a href="../../../../../org/apache/hadoop/fs/RemoteIterator.html" title="interface in org.apache.hadoop.fs">RemoteIterator</a><T> source, |
| <a href="../../../../../org/apache/hadoop/util/functional/ConsumerRaisingIOE.html" title="interface in org.apache.hadoop.util.functional">ConsumerRaisingIOE</a><? super T> consumer) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Apply an operation to all values of a RemoteIterator. |
| <p></p> |
| If the iterator is an IOStatisticsSource returning a non-null |
| set of statistics, <i>and</i> this classes log is set to DEBUG, |
| then the statistics of the operation are evaluated and logged at |
| debug. |
| <p></p> |
| The number of entries processed is returned, as it is useful to |
| know this, especially during tests or when reporting values |
| to users. |
| <p></p> |
| This does not close the iterator afterwards.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - type of source</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>source</code> - iterator source</dd> |
| <dd><code>consumer</code> - consumer of the values.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the number of elements processed</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the source RemoteIterator or the consumer raise one.</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="class-use/RemoteIterators.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/apache/hadoop/util/functional/InvocationRaisingIOE.html" title="interface in org.apache.hadoop.util.functional"><span class="typeNameLink">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/hadoop/util/functional/RemoteIterators.html" target="_top">Frames</a></li> |
| <li><a href="RemoteIterators.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>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 © 2008–2021 <a href="https://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |