public interface BatchScanner extends ScannerBase
Scanner
in use cases such as
Scanner
instead when sorted order is
important.
A BatchScanner instance will use no more threads than provided in the construction of the BatchScanner implementation. Multiple invocations of
iterator()
will all share the same resources of the instance. A new BatchScanner instance should be created to use allocate additional threads.
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes any underlying connections on the scanner
|
void |
setRanges(Collection<Range> ranges)
Allows scanning over multiple ranges efficiently.
|
void |
setTimeout(long timeout,
TimeUnit timeUnit)
This setting determines how long a scanner will automatically retry when a failure occurs.
|
addScanIterator, clearColumns, clearScanIterators, fetchColumn, fetchColumn, fetchColumnFamily, getAuthorizations, getTimeout, iterator, removeScanIterator, updateScanIteratorOption
forEach, spliterator
void setRanges(Collection<Range> ranges)
ranges
- specifies the non-overlapping ranges to queryvoid close()
ScannerBase
close
in interface ScannerBase
void setTimeout(long timeout, TimeUnit timeUnit)
Setting the timeout to zero (with any time unit) or Long.MAX_VALUE
(with TimeUnit.MILLISECONDS
) means no timeout.
The batch scanner will accomplish as much work as possible before throwing an exception. BatchScanner iterators will throw a TimedOutException
when
all needed servers timeout.
setTimeout
in interface ScannerBase
timeout
- the length of the timeouttimeUnit
- the units of the timeoutCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.