@InterfaceAudience.Private public abstract class UserScanQueryMatcher extends ScanQueryMatcher
We do not consider mvcc here because
StoreFileScanner and
SegmentScanner will only return a cell whose mvcc is
less than or equal to given read point. For
IsolationLevel.READ_UNCOMMITTED, we just set the read
point to Long.MAX_VALUE, i.e. still do not need to consider it.
ScanQueryMatcher.MatchCode| Modifier and Type | Field and Description |
|---|---|
private int |
count |
private Cell |
curColCell |
protected Filter |
filter |
protected boolean |
hasNullColumn |
protected byte[] |
stopRow |
protected TimeRange |
tr |
private int |
versionsAfterFilter |
columns, currentRow, now, oldestUnexpiredTS, rowComparator, startKey| Modifier | Constructor and Description |
|---|---|
protected |
UserScanQueryMatcher(Scan scan,
ScanInfo scanInfo,
ColumnTracker columns,
boolean hasNullColumn,
long oldestUnexpiredTS,
long now) |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeShipped()
The action that needs to be performed before
Shipper.shipped() is performed |
static UserScanQueryMatcher |
create(Scan scan,
ScanInfo scanInfo,
NavigableSet<byte[]> columns,
long oldestUnexpiredTS,
long now,
RegionCoprocessorHost regionCoprocessorHost) |
private static Cell |
createStartKey(Scan scan,
ScanInfo scanInfo) |
Filter |
getFilter() |
Cell |
getNextKeyHint(Cell cell)
Delegate to
Filter.getNextCellHint(Cell). |
boolean |
hasNullColumnInQuery() |
protected abstract boolean |
isGet() |
boolean |
isUserScan() |
protected ScanQueryMatcher.MatchCode |
matchColumn(Cell cell,
long timestamp,
byte typeByte) |
private ScanQueryMatcher.MatchCode |
mergeFilterResponse(Cell cell,
ScanQueryMatcher.MatchCode matchCode,
Filter.ReturnCode filterResponse)
Call this when scan has filter.
|
boolean |
moreRowsMayExistAfter(Cell cell) |
protected abstract boolean |
moreRowsMayExistsAfter(int cmpToStopRow) |
checkColumn, checkDeleted, clearCurrentRow, compareKeyForNextColumn, compareKeyForNextRow, createStartKeyFromRow, currentRow, getKeyForNextColumn, getStartKey, getTrackers, match, preCheck, reset, setToNewRowprotected final boolean hasNullColumn
protected final byte[] stopRow
private final int versionsAfterFilter
private int count
private Cell curColCell
protected UserScanQueryMatcher(Scan scan, ScanInfo scanInfo, ColumnTracker columns, boolean hasNullColumn, long oldestUnexpiredTS, long now)
private static Cell createStartKey(Scan scan, ScanInfo scanInfo)
public boolean hasNullColumnInQuery()
hasNullColumnInQuery in class ScanQueryMatcherpublic boolean isUserScan()
isUserScan in class ScanQueryMatcherpublic Filter getFilter()
getFilter in class ScanQueryMatcherpublic Cell getNextKeyHint(Cell cell) throws IOException
ScanQueryMatcherFilter.getNextCellHint(Cell). If no filter, return null.getNextKeyHint in class ScanQueryMatcherIOExceptionpublic void beforeShipped() throws IOException
ShipperListenerShipper.shipped() is performedbeforeShipped in interface ShipperListenerbeforeShipped in class ScanQueryMatcherIOExceptionprotected final ScanQueryMatcher.MatchCode matchColumn(Cell cell, long timestamp, byte typeByte) throws IOException
IOExceptionprivate final ScanQueryMatcher.MatchCode mergeFilterResponse(Cell cell, ScanQueryMatcher.MatchCode matchCode, Filter.ReturnCode filterResponse)
ColumnChecker FilterResponse Desired behavior INCLUDE SKIP SKIP INCLUDE NEXT_COL SEEK_NEXT_COL or SEEK_NEXT_ROW INCLUDE NEXT_ROW SEEK_NEXT_ROW INCLUDE SEEK_NEXT_USING_HINT SEEK_NEXT_USING_HINT INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE_AND_NEXT_COL INCLUDE_AND_SEEK_NEXT_COL INCLUDE INCLUDE_AND_SEEK_NEXT_ROW INCLUDE_AND_SEEK_NEXT_ROW INCLUDE_AND_SEEK_NEXT_COL SKIP SEEK_NEXT_COL INCLUDE_AND_SEEK_NEXT_COL NEXT_COL SEEK_NEXT_COL or SEEK_NEXT_ROW INCLUDE_AND_SEEK_NEXT_COL NEXT_ROW SEEK_NEXT_ROW INCLUDE_AND_SEEK_NEXT_COL SEEK_NEXT_USING_HINT SEEK_NEXT_USING_HINT INCLUDE_AND_SEEK_NEXT_COL INCLUDE INCLUDE_AND_SEEK_NEXT_COL INCLUDE_AND_SEEK_NEXT_COL INCLUDE_AND_NEXT_COL INCLUDE_AND_SEEK_NEXT_COL INCLUDE_AND_SEEK_NEXT_COL INCLUDE_AND_SEEK_NEXT_ROW INCLUDE_AND_SEEK_NEXT_ROW INCLUDE_AND_SEEK_NEXT_ROW SKIP SEEK_NEXT_ROW INCLUDE_AND_SEEK_NEXT_ROW NEXT_COL SEEK_NEXT_ROW INCLUDE_AND_SEEK_NEXT_ROW NEXT_ROW SEEK_NEXT_ROW INCLUDE_AND_SEEK_NEXT_ROW SEEK_NEXT_USING_HINT SEEK_NEXT_USING_HINT INCLUDE_AND_SEEK_NEXT_ROW INCLUDE INCLUDE_AND_SEEK_NEXT_ROW INCLUDE_AND_SEEK_NEXT_ROW INCLUDE_AND_NEXT_COL INCLUDE_AND_SEEK_NEXT_ROW INCLUDE_AND_SEEK_NEXT_ROW INCLUDE_AND_SEEK_NEXT_ROW INCLUDE_AND_SEEK_NEXT_ROW
protected abstract boolean isGet()
protected abstract boolean moreRowsMayExistsAfter(int cmpToStopRow)
public boolean moreRowsMayExistAfter(Cell cell)
moreRowsMayExistAfter in class ScanQueryMatcherstopRow or we are scanning on row only because this Scan is for a Get,
etc.public static UserScanQueryMatcher create(Scan scan, ScanInfo scanInfo, NavigableSet<byte[]> columns, long oldestUnexpiredTS, long now, RegionCoprocessorHost regionCoprocessorHost) throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.