|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ColumnTracker
Implementing classes of this interface will be used for the tracking and enforcement of columns and numbers of versions and timeToLive during the course of a Get or Scan operation.
Currently there are two different types of Store/Family-level queries.
ExplicitColumnTracker
is used when the query specifies
one or more column qualifiers to return in the family.
This class is utilized by ScanQueryMatcher
through two methods:
checkColumn(byte[], int, int, long, boolean)
is called when a Put satisfies all other
conditions of the query. This method returns a ScanQueryMatcher.MatchCode
to define
what action should be taken.
update()
is called at the end of every StoreFile or memstore.
This class is NOT thread-safe as queries are never multi-threaded
Method Summary | |
---|---|
ScanQueryMatcher.MatchCode |
checkColumn(byte[] bytes,
int offset,
int length,
long ttl,
boolean ignoreCount)
Keeps track of the number of versions for the columns asked for |
boolean |
done()
|
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(byte[] bytes,
int offset,
int qualLength)
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 |
void |
update()
Updates internal variables in between files |
Method Detail |
---|
ScanQueryMatcher.MatchCode checkColumn(byte[] bytes, int offset, int length, long ttl, boolean ignoreCount) throws IOException
bytes
- offset
- length
- ttl
- The timeToLive to enforce.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.void update()
void reset()
boolean done()
true
when done.ColumnCount getColumnHint()
ScanQueryMatcher.MatchCode getNextRowOrNextColumn(byte[] bytes, int offset, int qualLength)
boolean isDone(long timestamp)
timestamp
-
true
to early out based on timestamp.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |