@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 n |
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()
Returns the Filter
|
Cell |
getNextKeyHint(Cell cell)
Delegate to
Filter.getNextCellHint(Cell) . |
boolean |
hasNullColumnInQuery()
Returns whether there is an null column in the query
|
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, setToNewRow
protected 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()
ScanQueryMatcher
hasNullColumnInQuery
in class ScanQueryMatcher
public boolean isUserScan()
isUserScan
in class ScanQueryMatcher
public Filter getFilter()
ScanQueryMatcher
getFilter
in class ScanQueryMatcher
public Cell getNextKeyHint(Cell cell) throws IOException
ScanQueryMatcher
Filter.getNextCellHint(Cell)
. If no filter, return null
.getNextKeyHint
in class ScanQueryMatcher
IOException
public void beforeShipped() throws IOException
ShipperListener
Shipper.shipped()
is performed nbeforeShipped
in interface ShipperListener
beforeShipped
in class ScanQueryMatcher
IOException
protected final ScanQueryMatcher.MatchCode matchColumn(Cell cell, long timestamp, byte typeByte) throws IOException
IOException
private 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 ScanQueryMatcher
stopRow
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
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.