Interface RFile.ScannerOptions
-
- All Known Subinterfaces:
RFile.ScannerFSOptions
- Enclosing class:
- RFile
public static interface RFile.ScannerOptionsThis 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Scannerbuild()RFile.ScannerOptionswithAuthorizations(Authorizations auths)The authorizations passed here will be used to filter Keys, from theScanner, based on the content of the column visibility field.RFile.ScannerOptionswithBounds(Range range)This option allows limiting theScannerfrom reading data outside of a given range.RFile.ScannerOptionswithDataCache(long cacheSize)Enabling this option will cache RFiles data in memory.RFile.ScannerOptionswithIndexCache(long cacheSize)Enabling this option will cache RFiles indexes in memory.RFile.ScannerOptionswithoutSystemIterators()By default theScannercreated will setup the default Accumulo system iterators.RFile.ScannerOptionswithTableProperties(Iterable<Map.Entry<String,String>> props)Construct theScannerwith iterators specified in a tables properties.RFile.ScannerOptionswithTableProperties(Map<String,String> props)
-
-
-
Method Detail
-
withoutSystemIterators
RFile.ScannerOptions withoutSystemIterators()
By default theScannercreated 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
Keys 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
RFile.ScannerOptions withAuthorizations(Authorizations auths)
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
RFile.ScannerOptions withDataCache(long cacheSize)
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
RFile.ScannerOptions withIndexCache(long cacheSize)
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
RFile.ScannerOptions withBounds(Range range)
This option allows limiting theScannerfrom 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
RFile.ScannerOptions withTableProperties(Iterable<Map.Entry<String,String>> props)
Construct theScannerwith iterators specified in a tables properties. Properties for a table can be obtained by callingTableOperations.getProperties(String). Any property that impacts file behavior regardless of whether it has theProperty.TABLE_PREFIXmay be accepted and used. For example, cache and crypto properties could be passed here.- Parameters:
props- iterable over Accumulo table key value properties.- Returns:
- this
-
withTableProperties
RFile.ScannerOptions withTableProperties(Map<String,String> props)
- Parameters:
props- a map instead of an Iterable- Returns:
- this
- See Also:
Any property that impacts file behavior regardless of whether it has the may be accepted and used. For example, cache and crypto properties could be passed here.
-
build
Scanner build()
- Returns:
- a Scanner over RFile using the specified options.
-
-