|
||||||||||
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.
ScanWildcardColumnTracker
is used when no columns are
explicitly specified.
This class is utilized by ScanQueryMatcher
mainly through two methods:
checkColumn(byte[], int, int, long, byte, boolean)
is called when a Put satisfies all other
conditions of the query.
getNextRowOrNextColumn(byte[], int, int)
is called whenever ScanQueryMatcher
believes that the current column should be skipped (by timestamp, filter etc.)
These two methods returns a
ScanQueryMatcher.MatchCode
to define what action should be taken.
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,
byte type,
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 |
Method Detail |
---|
ScanQueryMatcher.MatchCode checkColumn(byte[] bytes, int offset, int length, long ttl, byte type, boolean ignoreCount) throws IOException
bytes
- offset
- length
- ttl
- The timeToLive to enforce.type
- The type of the KeyValueignoreCount
- 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 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 |