@InterfaceAudience.Private public class ScanWildcardColumnTracker extends Object implements ColumnTracker
| 构造器和说明 |
|---|
ScanWildcardColumnTracker(int minVersion,
int maxVersion,
long oldestUnexpiredTS,
CellComparator comparator)
Return maxVersions of every row.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
beforeShipped()
The action that needs to be performed before
Shipper.shipped() is performed |
ScanQueryMatcher.MatchCode |
checkColumn(Cell cell,
byte type)
Checks if the column is present in the list of requested columns by returning the match code
instance.
|
ScanQueryMatcher.MatchCode |
checkVersions(Cell cell,
long timestamp,
byte type,
boolean ignoreCount)
Keeps track of the number of versions for the columns asked for.
|
boolean |
done()
We can never know a-priori if we are done, so always return false.
|
org.apache.hadoop.hbase.regionserver.querymatcher.ColumnCount |
getColumnHint()
Used by matcher and scan/get to get a hint of the next column to seek to after checkColumn()
returns SKIP.
|
ScanQueryMatcher.MatchCode |
getNextRowOrNextColumn(Cell cell)
Retrieve the MatchCode for the next row or column
|
boolean |
isDone(long timestamp)
Give the tracker a chance to declare it's done based on only the timestamp
to allow an early out.
|
void |
reset()
Resets the Matcher
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdoneWithColumnpublic ScanWildcardColumnTracker(int minVersion,
int maxVersion,
long oldestUnexpiredTS,
CellComparator comparator)
minVersion - Minimum number of versions to keepmaxVersion - Maximum number of versions to returnoldestUnexpiredTS - oldest timestamp that has not expired according to the TTL.comparator - used to compare the qualifier of cellpublic ScanQueryMatcher.MatchCode checkColumn(Cell cell, byte type) throws IOException
ColumnTracker.checkVersions(Cell, long, byte, boolean)
method based on the return type (INCLUDE) of this method. The values that can be returned by
this method are ScanQueryMatcher.MatchCode.INCLUDE, ScanQueryMatcher.MatchCode.SEEK_NEXT_COL and
ScanQueryMatcher.MatchCode.SEEK_NEXT_ROW. This receives puts *and* deletes.checkColumn 在接口中 ColumnTrackercell - a cell with the column to match againsttype - The type of the CellIOException - in case there is an internal consistency problem caused by a data
corruption.public ScanQueryMatcher.MatchCode checkVersions(Cell cell, long timestamp, byte type, boolean ignoreCount) throws IOException
ColumnTracker.checkColumn(Cell, byte) method. The enum values returned by this method
are ScanQueryMatcher.MatchCode.SKIP, ScanQueryMatcher.MatchCode.INCLUDE,
ScanQueryMatcher.MatchCode.INCLUDE_AND_SEEK_NEXT_COL and ScanQueryMatcher.MatchCode.INCLUDE_AND_SEEK_NEXT_ROW.
Implementations which include all the columns could just return ScanQueryMatcher.MatchCode.INCLUDE in
the ColumnTracker.checkColumn(Cell, byte) method and perform all the operations in this
checkVersions method. This receives puts *and* deletes. Deletes do not count as a version, but rather
take the version of the previous put (so eventually all but the last can be reclaimed).checkVersions 在接口中 ColumnTrackercell - a cell with the column to match againsttimestamp - The timestamp of the cell.type - the type of the key value (Put/Delete)ignoreCount - indicates if the KV needs to be excluded while counting (used during
compactions. We only count KV's that are older than all the scanners' read points.)IOException - in case there is an internal consistency problem caused by a data
corruption.public void reset()
ColumnTrackerreset 在接口中 ColumnTrackerpublic org.apache.hadoop.hbase.regionserver.querymatcher.ColumnCount getColumnHint()
getColumnHint 在接口中 ColumnTrackerpublic boolean done()
done 在接口中 ColumnTrackerpublic ScanQueryMatcher.MatchCode getNextRowOrNextColumn(Cell cell)
ColumnTrackergetNextRowOrNextColumn 在接口中 ColumnTrackerpublic void beforeShipped()
ShipperListenerShipper.shipped() is performedbeforeShipped 在接口中 ShipperListenerpublic boolean isDone(long timestamp)
ColumnTrackerisDone 在接口中 ColumnTrackertrue to early out based on timestamp.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.