Class TabletServerBatchReader
- java.lang.Object
-
- org.apache.accumulo.core.clientImpl.ScannerOptions
-
- org.apache.accumulo.core.clientImpl.TabletServerBatchReader
-
- All Implemented Interfaces:
AutoCloseable
,Iterable<Map.Entry<Key,Value>>
,BatchScanner
,ScannerBase
- Direct Known Subclasses:
TabletServerBatchDeleter
public class TabletServerBatchReader extends ScannerOptions implements BatchScanner
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.accumulo.core.client.ScannerBase
ScannerBase.ConsistencyLevel
-
-
Field Summary
-
Fields inherited from class org.apache.accumulo.core.clientImpl.ScannerOptions
batchTimeout, classLoaderContext, executionHints, fetchedColumns, retryTimeout, serverSideIteratorList, serverSideIteratorOptions
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TabletServerBatchReader(ClientContext context, Class<?> scopeClass, TableId tableId, String tableName, Authorizations authorizations, int numQueryThreads)
TabletServerBatchReader(ClientContext context, TableId tableId, String tableName, Authorizations authorizations, int numQueryThreads)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes any underlying connections on the scanner.Authorizations
getAuthorizations()
Returns the authorizations that have been set on the scannerIterator<Map.Entry<Key,Value>>
iterator()
Returns an iterator over an accumulo table.void
setRanges(Collection<Range> ranges)
Allows scanning over multiple ranges efficiently.-
Methods inherited from class org.apache.accumulo.core.clientImpl.ScannerOptions
addScanIterator, clearClassLoaderContext, clearColumns, clearSamplerConfiguration, clearScanIterators, fetchColumn, fetchColumn, fetchColumnFamily, getBatchTimeout, getClassLoaderContext, getConsistencyLevel, getFetchedColumns, getSamplerConfiguration, getTimeout, removeScanIterator, setBatchTimeout, setClassLoaderContext, setConsistencyLevel, setExecutionHints, setOptions, setSamplerConfiguration, setTimeout, updateScanIteratorOption
-
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.BatchScanner
setTimeout
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface org.apache.accumulo.core.client.ScannerBase
addScanIterator, clearClassLoaderContext, clearColumns, clearSamplerConfiguration, clearScanIterators, fetchColumn, fetchColumn, fetchColumn, fetchColumnFamily, fetchColumnFamily, forEach, getBatchTimeout, getClassLoaderContext, getConsistencyLevel, getSamplerConfiguration, getTimeout, removeScanIterator, setBatchTimeout, setClassLoaderContext, setConsistencyLevel, setExecutionHints, setSamplerConfiguration, stream, updateScanIteratorOption
-
-
-
-
Constructor Detail
-
TabletServerBatchReader
public TabletServerBatchReader(ClientContext context, TableId tableId, String tableName, Authorizations authorizations, int numQueryThreads)
-
TabletServerBatchReader
protected TabletServerBatchReader(ClientContext context, Class<?> scopeClass, TableId tableId, String tableName, Authorizations authorizations, int numQueryThreads)
-
-
Method Detail
-
close
public void close()
Description copied from interface:ScannerBase
Closes any underlying connections on the scanner. This may invalidate any iterators derived from the Scanner, causing them to throw exceptions.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceBatchScanner
- Specified by:
close
in interfaceScannerBase
- Overrides:
close
in classScannerOptions
-
getAuthorizations
public Authorizations getAuthorizations()
Description copied from interface:ScannerBase
Returns the authorizations that have been set on the scanner- Specified by:
getAuthorizations
in interfaceScannerBase
- Overrides:
getAuthorizations
in classScannerOptions
- Returns:
- The authorizations set on the scanner instance
-
setRanges
public void setRanges(Collection<Range> ranges)
Description copied from interface:BatchScanner
Allows scanning over multiple ranges efficiently.- Specified by:
setRanges
in interfaceBatchScanner
- Parameters:
ranges
- specifies the non-overlapping ranges to query
-
iterator
public Iterator<Map.Entry<Key,Value>> iterator()
Description copied from interface:ScannerBase
Returns an iterator over an 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 interfaceIterable<Map.Entry<Key,Value>>
- Specified by:
iterator
in interfaceScannerBase
- Overrides:
iterator
in classScannerOptions
- Returns:
- an iterator over Key,Value pairs which meet the restrictions set on the scanner
-
-