Interface ScanOptions
- All Known Implementing Classes:
CustomizedScanInfoBuilder
This class gives you the ability to change the max versions and TTL options before opening a
scanner for a Store. And also gives you some information for the scan.
Changing max versions, min versins, KeepDeletedCells, and TTL are usually safe even for
flush/compaction, so here we provide a way to do it for you. If you want to do other complicated
operations such as filtering, please wrap the InternalScanner in the preCompact
and preFlush methods in RegionObserver.
For user scans, we also provide this class as a parameter in the preStoreScannerOpen
method in RegionObserver. You can use it to change
the inherent properties for a Store. For example, even if you use Scan.readAllVersions,
you still can not read two versions if the max versions property of the Store is one. You need to
set the max versions to a value greater than two in preStoreScannerOpen.
- See Also:
-
RegionObserver.preFlushScannerOpen(org.apache.hadoop.hbase.coprocessor.ObserverContext, Store, ScanOptions, FlushLifeCycleTracker)RegionObserver.preCompactScannerOpen(org.apache.hadoop.hbase.coprocessor.ObserverContext, Store, ScanType, ScanOptions, org.apache.hadoop.hbase.regionserver.compactions.CompactionLifeCycleTracker, org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest)RegionObserver.preStoreScannerOpen(org.apache.hadoop.hbase.coprocessor.ObserverContext, Store, ScanOptions)
-
Method Summary
Modifier and TypeMethodDescriptionintintgetScan()Returns a copy of the Scan object.longlonggetTTL()default voidvoidsetKeepDeletedCells(KeepDeletedCells keepDeletedCells) voidsetMaxVersions(int maxVersions) voidsetMinVersions(int minVersions) voidsetTimeToPurgeDeletes(long ttl) voidsetTTL(long ttl)
-
Method Details
-
getMaxVersions
int getMaxVersions() -
setMaxVersions
-
readAllVersions
-
getTTL
long getTTL() -
setTTL
-
setKeepDeletedCells
-
getKeepDeletedCells
-
getMinVersions
int getMinVersions() -
setMinVersions
-
getTimeToPurgeDeletes
long getTimeToPurgeDeletes() -
setTimeToPurgeDeletes
-
getScan
Returns a copy of the Scan object. Modifying it will have no effect.
-