org.apache.accumulo.core.client
Interface Scanner

All Superinterfaces:
Iterable<Map.Entry<Key,Value>>, ScannerBase
All Known Implementing Classes:
ClientSideIteratorScanner, IsolatedScanner, MockScanner, OfflineScanner, ScannerImpl

public interface Scanner
extends ScannerBase

Scans a table over a given range. "Clients can iterate over multiple column families, and there are several mechanisms for limiting the rows, columns, and timestamps traversed by a scan. For example, we could restrict [a] scan ... to only produce anchors whose columns match [a] regular expression ..., or to only produce anchors whose timestamps fall within ten days of the current time."


Method Summary
 void disableIsolation()
          Disables row isolation.
 void enableIsolation()
          Enables row isolation.
 int getBatchSize()
          Returns the batch size (number of Key/Value pairs) that will be fetched at a time from a tablet server.
 Range getRange()
          Returns the range of keys to scan over.
 long getReadaheadThreshold()
          The number of batches of Key/Value pairs returned before the Scanner will begin to prefetch the next batch
 int getTimeOut()
          Deprecated. Since 1.5. See ScannerBase.getTimeout(java.util.concurrent.TimeUnit)
 void setBatchSize(int size)
          Sets the number of Key/Value pairs that will be fetched at a time from a tablet server.
 void setRange(Range range)
          Sets the range of keys to scan over.
 void setReadaheadThreshold(long batches)
          Sets the number of batches of Key/Value pairs returned before the Scanner will begin to prefetch the next batch
 void setTimeOut(int timeOut)
          Deprecated. Since 1.5. See ScannerBase.setTimeout(long, java.util.concurrent.TimeUnit)
 
Methods inherited from interface org.apache.accumulo.core.client.ScannerBase
addScanIterator, clearColumns, clearScanIterators, close, fetchColumn, fetchColumnFamily, getTimeout, iterator, removeScanIterator, setTimeout, updateScanIteratorOption
 

Method Detail

setTimeOut

@Deprecated
void setTimeOut(int timeOut)
Deprecated. Since 1.5. See ScannerBase.setTimeout(long, java.util.concurrent.TimeUnit)

This setting determines how long a scanner will automatically retry when a failure occurs. By default a scanner will retry forever.

Parameters:
timeOut - in seconds

getTimeOut

@Deprecated
int getTimeOut()
Deprecated. Since 1.5. See ScannerBase.getTimeout(java.util.concurrent.TimeUnit)

Returns the setting for how long a scanner will automatically retry when a failure occurs.

Returns:
the timeout configured for this scanner

setRange

void setRange(Range range)
Sets the range of keys to scan over.

Parameters:
range - key range to begin and end scan

getRange

Range getRange()
Returns the range of keys to scan over.

Returns:
the range configured for this scanner

setBatchSize

void setBatchSize(int size)
Sets the number of Key/Value pairs that will be fetched at a time from a tablet server.

Parameters:
size - the number of Key/Value pairs to fetch per call to Accumulo

getBatchSize

int getBatchSize()
Returns the batch size (number of Key/Value pairs) that will be fetched at a time from a tablet server.

Returns:
the batch size configured for this scanner

enableIsolation

void enableIsolation()
Enables row isolation. Writes that occur to a row after a scan of that row has begun will not be seen if this option is enabled.


disableIsolation

void disableIsolation()
Disables row isolation. Writes that occur to a row after a scan of that row has begun may be seen if this option is enabled.


getReadaheadThreshold

long getReadaheadThreshold()
The number of batches of Key/Value pairs returned before the Scanner will begin to prefetch the next batch

Returns:
Number of batches before read-ahead begins
Since:
1.6.0

setReadaheadThreshold

void setReadaheadThreshold(long batches)
Sets the number of batches of Key/Value pairs returned before the Scanner will begin to prefetch the next batch

Parameters:
batches - Non-negative number of batches
Since:
1.6.0


Copyright © 2015 Apache Accumulo Project. All rights reserved.