@InterfaceAudience.Private public abstract class ScanQueryMatcher extends Object implements ShipperListener
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 CellComparator |
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 |
---|---|
void |
beforeShipped()
The action that needs to be performed before
Shipper.shipped() is performed |
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() |
protected static Pair<DeleteTracker,ColumnTracker> |
getTrackers(RegionCoprocessorHost host,
NavigableSet<byte[]> columns,
ScanInfo scanInfo,
long oldestUnexpiredTS,
Scan userScan) |
abstract boolean |
hasNullColumnInQuery() |
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 CellComparator 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 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
public void beforeShipped() throws IOException
ShipperListener
Shipper.shipped()
is performedbeforeShipped
in interface ShipperListener
IOException
protected static Cell createStartKeyFromRow(byte[] startRow, ScanInfo scanInfo)
protected static Pair<DeleteTracker,ColumnTracker> getTrackers(RegionCoprocessorHost host, NavigableSet<byte[]> columns, ScanInfo scanInfo, long oldestUnexpiredTS, Scan userScan) throws IOException
IOException
Copyright © 2007–2019 Cloudera. All rights reserved.