@InterfaceAudience.Private public abstract class ScanQueryMatcher extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ScanQueryMatcher.MatchCode
match(org.apache.hadoop.hbase.Cell) return codes. |
Modifier and Type | Field and Description |
---|---|
protected ColumnTracker |
columns
Keeps track of columns and versions
|
protected Cell |
currentRow
Row the query is on
|
protected long |
now |
protected long |
oldestUnexpiredTS
The oldest timestamp we are interested in, based on TTL
|
protected KeyValue.KVComparator |
rowComparator
Row comparator for the region this query is for
|
protected Cell |
startKey
Key to seek to in memstore and StoreFiles
|
Modifier | Constructor and Description |
---|---|
protected |
ScanQueryMatcher(Cell startKey,
ScanInfo scanInfo,
ColumnTracker columns,
long oldestUnexpiredTS,
long now) |
Modifier and Type | Method and Description |
---|---|
protected ScanQueryMatcher.MatchCode |
checkDeleted(DeleteTracker deletes,
Cell cell) |
void |
clearCurrentRow()
Make
currentRow() return null. |
int |
compareKeyForNextColumn(Cell nextIndexed,
Cell currentCell) |
int |
compareKeyForNextRow(Cell nextIndexed,
Cell currentCell) |
protected static Cell |
createStartKeyFromRow(byte[] startRow,
ScanInfo scanInfo) |
Cell |
currentRow() |
abstract Filter |
getFilter() |
Cell |
getKeyForNextColumn(Cell cell) |
abstract Cell |
getNextKeyHint(Cell cell)
Delegate to
Filter.getNextCellHint(Cell) . |
Cell |
getStartKey() |
abstract boolean |
hasNullColumnInQuery() |
protected static DeleteTracker |
instantiateDeleteTracker(RegionCoprocessorHost host) |
abstract boolean |
isUserScan() |
abstract ScanQueryMatcher.MatchCode |
match(Cell 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)
|
abstract boolean |
moreRowsMayExistAfter(Cell cell) |
protected ScanQueryMatcher.MatchCode |
preCheck(Cell cell)
Check before the delete logic.
|
protected abstract void |
reset() |
void |
setToNewRow(Cell currentRow)
Set the row when there is change in row
|
protected final KeyValue.KVComparator rowComparator
protected final Cell startKey
protected final ColumnTracker columns
protected final long oldestUnexpiredTS
protected final long now
protected Cell currentRow
protected ScanQueryMatcher(Cell startKey, ScanInfo scanInfo, ColumnTracker columns, long oldestUnexpiredTS, long now)
protected static Cell createStartKeyFromRow(byte[] startRow, ScanInfo scanInfo)
protected final ScanQueryMatcher.MatchCode preCheck(Cell cell)
protected final ScanQueryMatcher.MatchCode checkDeleted(DeleteTracker deletes, Cell cell)
public abstract ScanQueryMatcher.MatchCode match(Cell cell) throws IOException
cell
- KeyValue to checkIOException
- in case there is an internal consistency problem caused by a data
corruption.public Cell getStartKey()
public abstract boolean hasNullColumnInQuery()
public Cell currentRow()
public void clearCurrentRow()
currentRow()
return null.protected abstract void reset()
public void setToNewRow(Cell currentRow)
currentRow
- public abstract boolean isUserScan()
public abstract boolean moreRowsMayExistAfter(Cell cell)
stopRow
or we are scanning on row only because this Scan is for a Get,
etc.public int compareKeyForNextRow(Cell nextIndexed, Cell currentCell)
nextIndexed
- the key of the next entry in the block index (if any)currentCell
- The Cell we're using to calculate the seek keypublic int compareKeyForNextColumn(Cell nextIndexed, Cell currentCell)
nextIndexed
- the key of the next entry in the block index (if any)currentCell
- The Cell we're using to calculate the seek keypublic abstract Filter getFilter()
public abstract Cell getNextKeyHint(Cell cell) throws IOException
Filter.getNextCellHint(Cell)
. If no filter, return null
.IOException
protected static DeleteTracker instantiateDeleteTracker(RegionCoprocessorHost host) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.