org.apache.accumulo.core.client.mock
Class MockScanner
java.lang.Object
org.apache.accumulo.core.client.mock.MockScannerBase
org.apache.accumulo.core.client.mock.MockScanner
- All Implemented Interfaces:
- java.lang.Iterable<java.util.Map.Entry<Key,Value>>, Scanner, ScannerBase
public class MockScanner
- extends MockScannerBase
- implements Scanner
Methods inherited from class org.apache.accumulo.core.client.mock.MockScannerBase |
clearColumns, clearScanIterators, createFilter, fetchColumn, fetchColumnFamily, setColumnFamilyRegex, setColumnQualifierRegex, setRowRegex, setScanIteratorOption, setScanIterators, setupRegex, setValueRegex |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.accumulo.core.client.ScannerBase |
clearColumns, clearScanIterators, fetchColumn, fetchColumnFamily, setColumnFamilyRegex, setColumnQualifierRegex, setRowRegex, setScanIteratorOption, setScanIterators, setupRegex, setValueRegex |
setTimeOut
public void setTimeOut(int timeOut)
- Description copied from interface:
Scanner
- When failure occurs, the scanner automatically retries. This setting determines how long a scanner will retry. By default a scanner will retry forever.
- Specified by:
setTimeOut
in interface Scanner
- Parameters:
timeOut
- in seconds
getTimeOut
public int getTimeOut()
- Specified by:
getTimeOut
in interface Scanner
- Returns:
- the timeout configured for this scanner
setRange
public void setRange(Range range)
- Specified by:
setRange
in interface Scanner
- Parameters:
range
- key range to begin and end scan
getRange
public Range getRange()
- Specified by:
getRange
in interface Scanner
- Returns:
- the range configured for this scanner
setBatchSize
public void setBatchSize(int size)
- Specified by:
setBatchSize
in interface Scanner
- Parameters:
size
- the number of Keys/Value pairs to fetch per call to Accumulo
getBatchSize
public int getBatchSize()
- Specified by:
getBatchSize
in interface Scanner
- Returns:
- the batch size configured for this scanner
enableIsolation
public void enableIsolation()
- Specified by:
enableIsolation
in interface Scanner
disableIsolation
public void disableIsolation()
- Specified by:
disableIsolation
in interface Scanner
iterator
public java.util.Iterator<java.util.Map.Entry<Key,Value>> iterator()
- Description copied from interface:
Scanner
- Returns an iterator over a accumulo table. This iterator uses the options that are currently set on the scanner for its lifetime. So setting options on a
Scanner object will have no effect on existing iterators.
Keys are returned in sorted order by the iterator.
- Specified by:
iterator
in interface java.lang.Iterable<java.util.Map.Entry<Key,Value>>
- Specified by:
iterator
in interface Scanner
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.