Package org.apache.hadoop.fs
Class BatchedRemoteIterator<K,E>
java.lang.Object
org.apache.hadoop.fs.BatchedRemoteIterator<K,E>
- All Implemented Interfaces:
RemoteIterator<E>
A RemoteIterator that fetches elements in batches.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract KelementToPrevKey(E element) Return the next list key associated with an element.booleanhasNext()Returnstrueif the iteration has more elements.abstract BatchedRemoteIterator.BatchedEntries<E>makeRequest(K prevKey) Perform the actual remote request.next()Returns the next element in the iteration.
-
Constructor Details
-
BatchedRemoteIterator
-
-
Method Details
-
makeRequest
Perform the actual remote request.- Parameters:
prevKey- The key to send.- Returns:
- A list of replies.
- Throws:
IOException- If an I/O error occurred.
-
hasNext
Description copied from interface:RemoteIteratorReturnstrueif the iteration has more elements.- Specified by:
hasNextin interfaceRemoteIterator<K>- Returns:
trueif the iterator has more elements.- Throws:
IOException- if any IO error occurs
-
elementToPrevKey
Return the next list key associated with an element.- Parameters:
element- element.- Returns:
- K Generics Type.
-
next
Description copied from interface:RemoteIteratorReturns the next element in the iteration.- Specified by:
nextin interfaceRemoteIterator<K>- Returns:
- the next element in the iteration.
- Throws:
IOException- if any IO error occurs
-