|
||||||||||
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 QueryMatcher
through two methods:
checkColumn(byte[], int, int)
is called when a Put satisfies all other
conditions of the query. This method returns a QueryMatcher.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 | |
---|---|
org.apache.hadoop.hbase.regionserver.QueryMatcher.MatchCode |
checkColumn(byte[] bytes,
int offset,
int length)
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. |
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 org.apache.hadoop.hbase.regionserver.QueryMatcher.MatchCode checkColumn(byte[] bytes, int offset, int length)
checkColumn
in interface ColumnTracker
bytes
- KeyValue bufferoffset
- offset to the start of the qualifierlength
- length of the qualifier
public void update()
update
in interface ColumnTracker
public void reset()
ColumnTracker
reset
in interface ColumnTracker
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |