Interface RFile.ScannerOptions
- All Known Subinterfaces:
RFile.ScannerFSOptions
- Enclosing class:
- RFile
public static interface RFile.ScannerOptions
This is an intermediate interface in a larger builder pattern. Supports setting optional
parameters for reading RFile(s) and building a scanner over RFile(s).
- Since:
- 1.8.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
withAuthorizations
(Authorizations auths) The authorizations passed here will be used to filter Keys, from theScanner
, based on the content of the column visibility field.withBounds
(Range range) This option allows limiting theScanner
from reading data outside of a given range.withDataCache
(long cacheSize) Enabling this option will cache RFiles data in memory.withIndexCache
(long cacheSize) Enabling this option will cache RFiles indexes in memory.By default theScanner
created will setup the default Accumulo system iterators.withTableProperties
(Iterable<Map.Entry<String, String>> props) Construct theScanner
with iterators specified in a tables properties.withTableProperties
(Map<String, String> props)
-
Method Details
-
withoutSystemIterators
RFile.ScannerOptions withoutSystemIterators()By default theScanner
created will setup the default Accumulo system iterators. The iterators do things like the following :- Suppress deleted data
- Filter based on @link
Authorizations
- Filter columns specified by functions like
ScannerBase.fetchColumn(Text, Text)
andScannerBase.fetchColumnFamily(Text)
Calling this method will turn off these system iterators and allow reading the raw data in an RFile. When reading the raw data, delete data and delete markers may be seen. Delete markers are
Key
s with the delete flag set.Disabling system iterators will cause
withAuthorizations(Authorizations)
,ScannerBase.fetchColumn(Text, Text)
, andScannerBase.fetchColumnFamily(Text)
to throw runtime exceptions.- Returns:
- this
-
withAuthorizations
The authorizations passed here will be used to filter Keys, from theScanner
, based on the content of the column visibility field.- Parameters:
auths
- scan with these authorizations- Returns:
- this
-
withDataCache
Enabling this option will cache RFiles data in memory. This option is useful when doing lots of random accesses.- Parameters:
cacheSize
- the size of the data cache in bytes.- Returns:
- this
-
withIndexCache
Enabling this option will cache RFiles indexes in memory. Index data within a RFile is used to find data when seeking to aKey
. This option is useful when doing lots of random accesses.- Parameters:
cacheSize
- the size of the index cache in bytes.- Returns:
- this
-
withBounds
This option allows limiting theScanner
from reading data outside of a given range. A scanner will not see any data outside of this range even if the RFile(s) have data outside the range.- Returns:
- this
-
withTableProperties
Construct theScanner
with iterators specified in a tables properties. Properties for a table can be obtained by callingTableOperations.getProperties(String)
- Parameters:
props
- iterable over Accumulo table key value properties.- Returns:
- this
-
withTableProperties
- Parameters:
props
- a map instead of an Iterable- Returns:
- this
- See Also:
-
build
Scanner build()- Returns:
- a Scanner over RFile using the specified options.
-