org.apache.accumulo.server.util
Class TabletIterator
java.lang.Object
org.apache.accumulo.server.util.TabletIterator
- All Implemented Interfaces:
- Iterator<Map<Key,Value>>
public class TabletIterator
- extends Object
- implements Iterator<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.
If a tablet that was returned by this iterator is subsequently deleted from the metadata table, then this iterator will throw a TabletDeletedException. This
could occur when a table is merged.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TabletIterator
public TabletIterator(Scanner s,
Range range,
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 Iterator<Map<Key,Value>>
next
public Map<Key,Value> next()
- Specified by:
next
in interface Iterator<Map<Key,Value>>
remove
public void remove()
- Specified by:
remove
in interface Iterator<Map<Key,Value>>
resetScanner
protected void resetScanner()
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.