@InterfaceAudience.Private class GetClosestRowBeforeTracker extends Object
HRegion.getClosestRowBefore(byte[], byte[])
.
Like ScanQueryMatcher
and ScanDeleteTracker
but does not
implement the DeleteTracker
interface since state spans rows (There
is no update nor reset method).Modifier and Type | Field and Description |
---|---|
private Cell |
candidate |
private NavigableMap<KeyValue,NavigableSet<KeyValue>> |
deletes |
private KeyValue.KVComparator |
kvcomparator |
private boolean |
metaregion |
private long |
now |
private long |
oldestUnexpiredTs |
private int |
rowoffset |
private int |
tablenamePlusDelimiterLength |
private KeyValue |
targetkey |
Constructor and Description |
---|
GetClosestRowBeforeTracker(KeyValue.KVComparator c,
KeyValue kv,
long ttl,
boolean metaregion) |
Modifier and Type | Method and Description |
---|---|
private boolean |
addCandidate(Cell kv) |
private void |
addDelete(Cell kv) |
Cell |
getCandidate() |
KeyValue |
getTargetKey() |
(package private) boolean |
handle(Cell kv)
Do right thing with passed key, add to deletes or add to candidates.
|
(package private) boolean |
handleDeletes(Cell kv) |
boolean |
hasCandidate() |
(package private) boolean |
isBetterCandidate(Cell contender) |
private boolean |
isDeleted(Cell kv) |
boolean |
isDeleted(Cell kv,
NavigableSet<KeyValue> ds)
Check if the specified KeyValue buffer has been deleted by a previously
seen delete.
|
boolean |
isExpired(Cell cell) |
(package private) boolean |
isTargetTable(Cell kv) |
(package private) boolean |
isTooFar(Cell kv,
Cell firstOnRow) |
private final KeyValue targetkey
private final long now
private final long oldestUnexpiredTs
private Cell candidate
private final KeyValue.KVComparator kvcomparator
private final boolean metaregion
private final int rowoffset
private final int tablenamePlusDelimiterLength
private final NavigableMap<KeyValue,NavigableSet<KeyValue>> deletes
GetClosestRowBeforeTracker(KeyValue.KVComparator c, KeyValue kv, long ttl, boolean metaregion)
c
- kv
- Presume first on row: i.e. empty column, maximum timestamp and
a type of Type.Maximumttl
- Time to live in ms for this Storemetaregion
- True if this is hbase:meta or -ROOT- region.private void addDelete(Cell kv)
private boolean addCandidate(Cell kv)
boolean isBetterCandidate(Cell contender)
private boolean isDeleted(Cell kv)
public boolean isDeleted(Cell kv, NavigableSet<KeyValue> ds)
kv
- ds
- public boolean isExpired(Cell cell)
cell
- boolean handleDeletes(Cell kv)
boolean handle(Cell kv)
kv
- public boolean hasCandidate()
public Cell getCandidate()
public KeyValue getTargetKey()
boolean isTooFar(Cell kv, Cell firstOnRow)
kv
- Current kvfirstOnRow
- on row kv.boolean isTargetTable(Cell kv)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.