org.apache.accumulo.core.client
Interface BatchScanner

All Superinterfaces:
java.lang.Iterable<java.util.Map.Entry<Key,Value>>, ScannerBase
All Known Implementing Classes:
MockBatchScanner, TabletServerBatchDeleter, TabletServerBatchReader

public interface BatchScanner
extends ScannerBase, java.lang.Iterable<java.util.Map.Entry<Key,Value>>

Implementations of BatchScanner support efficient lookups of many ranges in accumulo. Use this when looking up lots of ranges and you expect each range to contain a small amount of data. Also only use this when you do not care about the returned data being in sorted order. If you want to lookup a few ranges and expect those ranges to contain a lot of data, then use the Scanner instead. Also, the Scanner will return data in sorted order, this will not.


Method Summary
 void close()
          Cleans up and finalizes the scanner
 java.util.Iterator<java.util.Map.Entry<Key,Value>> iterator()
          Returns an iterator over a accumulo table.
 void setRanges(java.util.Collection<Range> ranges)
          Allows scanning over multiple ranges efficiently.
 
Methods inherited from interface org.apache.accumulo.core.client.ScannerBase
clearColumns, clearScanIterators, fetchColumn, fetchColumnFamily, setColumnFamilyRegex, setColumnQualifierRegex, setRowRegex, setScanIteratorOption, setScanIterators, setupRegex, setValueRegex
 

Method Detail

setRanges

void setRanges(java.util.Collection<Range> ranges)
Allows scanning over multiple ranges efficiently.

Parameters:
ranges - specifies the non-overlapping ranges to query

iterator

java.util.Iterator<java.util.Map.Entry<Key,Value>> iterator()
Returns an iterator over a accumulo table. This iterator uses the options that are currently set for its lifetime. So setting options will have no effect on existing iterators. Keys returned by the iterator are not guaranteed to be in sorted order.

Specified by:
iterator in interface java.lang.Iterable<java.util.Map.Entry<Key,Value>>

close

void close()
Cleans up and finalizes the scanner



Copyright © 2012 The Apache Software Foundation. All Rights Reserved.