Class NormalUserScanQueryMatcher
java.lang.Object
org.apache.hadoop.hbase.regionserver.querymatcher.ScanQueryMatcher
org.apache.hadoop.hbase.regionserver.querymatcher.UserScanQueryMatcher
org.apache.hadoop.hbase.regionserver.querymatcher.NormalUserScanQueryMatcher
- All Implemented Interfaces:
ShipperListener
Query matcher for normal user scan.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.regionserver.querymatcher.ScanQueryMatcher
ScanQueryMatcher.MatchCode -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanWhether seek optimization for range delete markers is applicableprivate final DeleteTrackerKeeps track of deletesprivate final booleanTrue if we are doing a 'Get' Scan.private ExtendedCellLast range delete cell, for qualifier comparison across consecutive markersprivate intCount of consecutive range delete markers seen for the same column(package private) static final intNumber of consecutive range delete markers (DeleteColumn/DeleteFamily) to skip before switching to seek.protected final booleanwhether time range queries can see rows "behind" a deleteFields inherited from class org.apache.hadoop.hbase.regionserver.querymatcher.UserScanQueryMatcher
filter, hasNullColumn, stopRow, trFields inherited from class org.apache.hadoop.hbase.regionserver.querymatcher.ScanQueryMatcher
columns, currentRow, now, oldestUnexpiredTS, rowComparator, startKey -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNormalUserScanQueryMatcher(Scan scan, ScanInfo scanInfo, ColumnTracker columns, boolean hasNullColumn, DeleteTracker deletes, long oldestUnexpiredTS, long now) -
Method Summary
Modifier and TypeMethodDescriptionvoidThe action that needs to be performed beforeShipper.shipped()is performedstatic NormalUserScanQueryMatchercreate(Scan scan, ScanInfo scanInfo, ColumnTracker columns, DeleteTracker deletes, boolean hasNullColumn, long oldestUnexpiredTS, long now) protected booleanisGet()match(ExtendedCell cell) Determines if the caller should do one of several things: seek/skip to the next row (MatchCode.SEEK_NEXT_ROW) seek/skip to the next column (MatchCode.SEEK_NEXT_COL) include the current KeyValue (MatchCode.INCLUDE) ignore the current KeyValue (MatchCode.SKIP) got to the next row (MatchCode.DONE)protected voidreset()Methods inherited from class org.apache.hadoop.hbase.regionserver.querymatcher.UserScanQueryMatcher
create, getFilter, getNextKeyHint, hasNullColumnInQuery, isUserScan, matchColumn, moreRowsMayExistAfter, moreRowsMayExistsAfterMethods inherited from class org.apache.hadoop.hbase.regionserver.querymatcher.ScanQueryMatcher
checkColumn, checkDeleted, clearCurrentRow, compareKeyForNextColumn, compareKeyForNextRow, createStartKeyFromRow, currentRow, getKeyForNextColumn, getStartKey, getTrackers, preCheck, preCheckRaw, setToNewRow
-
Field Details
-
SEEK_ON_DELETE_MARKER_THRESHOLD
Number of consecutive range delete markers (DeleteColumn/DeleteFamily) to skip before switching to seek. Seeking is more expensive than skipping for a single marker, but much faster when markers accumulate. This threshold avoids the seek overhead for the common case (one delete per row/column) while still kicking in when markers pile up.- See Also:
-
deletes
Keeps track of deletes -
get
True if we are doing a 'Get' Scan. Every Get is actually a one-row Scan. -
seePastDeleteMarkers
whether time range queries can see rows "behind" a delete -
canSeekOnDeleteMarker
Whether seek optimization for range delete markers is applicable -
rangeDeleteCount
Count of consecutive range delete markers seen for the same column -
lastDelete
Last range delete cell, for qualifier comparison across consecutive markers
-
-
Constructor Details
-
NormalUserScanQueryMatcher
protected NormalUserScanQueryMatcher(Scan scan, ScanInfo scanInfo, ColumnTracker columns, boolean hasNullColumn, DeleteTracker deletes, long oldestUnexpiredTS, long now)
-
-
Method Details
-
beforeShipped
Description copied from interface:ShipperListenerThe action that needs to be performed beforeShipper.shipped()is performed- Specified by:
beforeShippedin interfaceShipperListener- Overrides:
beforeShippedin classUserScanQueryMatcher- Throws:
IOException
-
match
Description copied from class:ScanQueryMatcherDetermines if the caller should do one of several things:- seek/skip to the next row (MatchCode.SEEK_NEXT_ROW)
- seek/skip to the next column (MatchCode.SEEK_NEXT_COL)
- include the current KeyValue (MatchCode.INCLUDE)
- ignore the current KeyValue (MatchCode.SKIP)
- got to the next row (MatchCode.DONE)
- Specified by:
matchin classScanQueryMatcher- Parameters:
cell- KeyValue to check- Returns:
- The match code instance.
- Throws:
IOException- in case there is an internal consistency problem caused by a data corruption.
-
reset
- Specified by:
resetin classScanQueryMatcher
-
isGet
- Specified by:
isGetin classUserScanQueryMatcher
-
create
public static NormalUserScanQueryMatcher create(Scan scan, ScanInfo scanInfo, ColumnTracker columns, DeleteTracker deletes, boolean hasNullColumn, long oldestUnexpiredTS, long now) throws IOException - Throws:
IOException
-