|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.regionserver.ExplicitColumnTracker
public class ExplicitColumnTracker
This class is used for the tracking and enforcement of columns and numbers
of versions during the course of a Get or Scan operation, when explicit
column qualifiers have been asked for in the query.
With a little magic (see ScanQueryMatcher
), we can use this matcher
for both scans and gets. The main difference is 'next' and 'done' collapse
for the scan case (since we see all columns in order), and we only reset
between rows.
This class is utilized by ScanQueryMatcher
through two methods:
checkColumn(byte[], int, int, long)
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
Constructor Summary | |
---|---|
ExplicitColumnTracker(NavigableSet<byte[]> columns,
int maxVersions)
Default constructor. |
Method Summary | |
---|---|
ScanQueryMatcher.MatchCode |
checkColumn(byte[] bytes,
int offset,
int length,
long timestamp)
Checks against the parameters of the query and the columns which have already been processed by this query. |
boolean |
done()
Done when there are no more columns to match against. |
void |
doneWithColumn(byte[] bytes,
int offset,
int length)
This method is used to inform the column tracker that we are done with this column. |
ColumnCount |
getColumnHint()
Used by matcher and scan/get to get a hint of the next column to seek to after checkColumn() returns SKIP. |
void |
reset()
Resets the Matcher |
void |
update()
Called at the end of every StoreFile or memstore. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExplicitColumnTracker(NavigableSet<byte[]> columns, int maxVersions)
columns
- columns specified user in querymaxVersions
- maximum versions to return per columnMethod Detail |
---|
public boolean done()
done
in interface ColumnTracker
true
when done.public ColumnCount getColumnHint()
ColumnTracker
getColumnHint
in interface ColumnTracker
public ScanQueryMatcher.MatchCode checkColumn(byte[] bytes, int offset, int length, long timestamp)
checkColumn
in interface ColumnTracker
bytes
- KeyValue bufferoffset
- offset to the start of the qualifierlength
- length of the qualifiertimestamp
- timestamp of the key being checked
public void update()
update
in interface ColumnTracker
public void reset()
ColumnTracker
reset
in interface ColumnTracker
public void doneWithColumn(byte[] bytes, int offset, int length)
bytes
- offset
- length
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |