org.apache.accumulo.server.util
Class TabletIterator
java.lang.Object
org.apache.accumulo.server.util.TabletIterator
- All Implemented Interfaces:
- java.util.Iterator<java.util.Map<Key,Value>>
public class TabletIterator
- extends java.lang.Object
- implements java.util.Iterator<java.util.Map<Key,Value>>
This class iterates over the metadata table returning all key values for a tablet in one chunk. As it scans the metadata table it checks the correctness of
the metadata table, and rescans if needed. So the tablet key/values returned by this iterator should satisfy the sorted linked list property of the metadata
table.
The purpose of this is to hide inconsistencies caused by splits and detect anomalies in the metadata table.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TabletIterator
public TabletIterator(Scanner s,
boolean returnPrevEndRow,
boolean returnDir)
- Parameters:
s
- A scanner over the entire metadata table configure to fetch needed columns.
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator<java.util.Map<Key,Value>>
next
public java.util.Map<Key,Value> next()
- Specified by:
next
in interface java.util.Iterator<java.util.Map<Key,Value>>
remove
public void remove()
- Specified by:
remove
in interface java.util.Iterator<java.util.Map<Key,Value>>
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.