View Javadoc

1   /**
2    *
3    * Licensed to the Apache Software Foundation (ASF) under one
4    * or more contributor license agreements.  See the NOTICE file
5    * distributed with this work for additional information
6    * regarding copyright ownership.  The ASF licenses this file
7    * to you under the Apache License, Version 2.0 (the
8    * "License"); you may not use this file except in compliance
9    * with the License.  You may obtain a copy of the License at
10   *
11   *     http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   */
19  
20  package org.apache.hadoop.hbase.regionserver;
21  
22  import java.io.IOException;
23  import java.util.NavigableSet;
24  
25  import org.apache.hadoop.classification.InterfaceAudience;
26  import org.apache.hadoop.hbase.Cell;
27  import org.apache.hadoop.hbase.HConstants;
28  import org.apache.hadoop.hbase.KeyValue;
29  import org.apache.hadoop.hbase.client.Scan;
30  import org.apache.hadoop.hbase.filter.Filter;
31  import org.apache.hadoop.hbase.filter.Filter.ReturnCode;
32  import org.apache.hadoop.hbase.io.TimeRange;
33  import org.apache.hadoop.hbase.regionserver.DeleteTracker.DeleteResult;
34  import org.apache.hadoop.hbase.util.Bytes;
35  import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
36  
37  import com.google.common.base.Preconditions;
38  
39  /**
40   * A query matcher that is specifically designed for the scan case.
41   */
42  @InterfaceAudience.Private
43  public class ScanQueryMatcher {
44    // Optimization so we can skip lots of compares when we decide to skip
45    // to the next row.
46    private boolean stickyNextRow;
47    private final byte[] stopRow;
48  
49    private final TimeRange tr;
50  
51    private final Filter filter;
52  
53    /** Keeps track of deletes */
54    private final DeleteTracker deletes;
55  
56    /*
57     * The following three booleans define how we deal with deletes.
58     * There are three different aspects:
59     * 1. Whether to keep delete markers. This is used in compactions.
60     *    Minor compactions always keep delete markers.
61     * 2. Whether to keep deleted rows. This is also used in compactions,
62     *    if the store is set to keep deleted rows. This implies keeping
63     *    the delete markers as well.
64     *    In this case deleted rows are subject to the normal max version
65     *    and TTL/min version rules just like "normal" rows.
66     * 3. Whether a scan can do time travel queries even before deleted
67     *    marker to reach deleted rows.
68     */
69    /** whether to retain delete markers */
70    private boolean retainDeletesInOutput;
71  
72    /** whether to return deleted rows */
73    private final boolean keepDeletedCells;
74    /** whether time range queries can see rows "behind" a delete */
75    private final boolean seePastDeleteMarkers;
76  
77  
78    /** Keeps track of columns and versions */
79    private final ColumnTracker columns;
80  
81    /** Key to seek to in memstore and StoreFiles */
82    private final KeyValue startKey;
83  
84    /** Row comparator for the region this query is for */
85    private final KeyValue.KVComparator rowComparator;
86  
87    /* row is not private for tests */
88    /** Row the query is on */
89    byte [] row;
90    int rowOffset;
91    short rowLength;
92    
93    /**
94     * Oldest put in any of the involved store files
95     * Used to decide whether it is ok to delete
96     * family delete marker of this store keeps
97     * deleted KVs.
98     */
99    private final long earliestPutTs;
100 
101   /** readPoint over which the KVs are unconditionally included */
102   protected long maxReadPointToTrackVersions;
103 
104   private byte[] dropDeletesFromRow = null, dropDeletesToRow = null;
105 
106   /**
107    * This variable shows whether there is an null column in the query. There
108    * always exists a null column in the wildcard column query.
109    * There maybe exists a null column in the explicit column query based on the
110    * first column.
111    * */
112   private boolean hasNullColumn = true;
113 
114   // By default, when hbase.hstore.time.to.purge.deletes is 0ms, a delete
115   // marker is always removed during a major compaction. If set to non-zero
116   // value then major compaction will try to keep a delete marker around for
117   // the given number of milliseconds. We want to keep the delete markers
118   // around a bit longer because old puts might appear out-of-order. For
119   // example, during log replication between two clusters.
120   //
121   // If the delete marker has lived longer than its column-family's TTL then
122   // the delete marker will be removed even if time.to.purge.deletes has not
123   // passed. This is because all the Puts that this delete marker can influence
124   // would have also expired. (Removing of delete markers on col family TTL will
125   // not happen if min-versions is set to non-zero)
126   //
127   // But, if time.to.purge.deletes has not expired then a delete
128   // marker will not be removed just because there are no Puts that it is
129   // currently influencing. This is because Puts, that this delete can
130   // influence.  may appear out of order.
131   private final long timeToPurgeDeletes;
132   
133   private final boolean isUserScan;
134 
135   private final boolean isReversed;
136 
137   /**
138    * Construct a QueryMatcher for a scan
139    * @param scan
140    * @param scanInfo The store's immutable scan info
141    * @param columns
142    * @param scanType Type of the scan
143    * @param earliestPutTs Earliest put seen in any of the store files.
144    * @param oldestUnexpiredTS the oldest timestamp we are interested in,
145    *  based on TTL
146    */
147   public ScanQueryMatcher(Scan scan, ScanInfo scanInfo,
148       NavigableSet<byte[]> columns, ScanType scanType,
149       long readPointToUse, long earliestPutTs, long oldestUnexpiredTS) {
150     this.tr = scan.getTimeRange();
151     this.rowComparator = scanInfo.getComparator();
152     this.deletes =  new ScanDeleteTracker();
153     this.stopRow = scan.getStopRow();
154     this.startKey = KeyValue.createFirstDeleteFamilyOnRow(scan.getStartRow(),
155         scanInfo.getFamily());
156     this.filter = scan.getFilter();
157     this.earliestPutTs = earliestPutTs;
158     this.maxReadPointToTrackVersions = readPointToUse;
159     this.timeToPurgeDeletes = scanInfo.getTimeToPurgeDeletes();
160 
161     /* how to deal with deletes */
162     this.isUserScan = scanType == ScanType.USER_SCAN;
163     // keep deleted cells: if compaction or raw scan
164     this.keepDeletedCells = (scanInfo.getKeepDeletedCells() && !isUserScan) || scan.isRaw();
165     // retain deletes: if minor compaction or raw scan
166     this.retainDeletesInOutput = scanType == ScanType.COMPACT_RETAIN_DELETES || scan.isRaw();
167     // seePastDeleteMarker: user initiated scans
168     this.seePastDeleteMarkers = scanInfo.getKeepDeletedCells() && isUserScan;
169 
170     int maxVersions =
171         scan.isRaw() ? scan.getMaxVersions() : Math.min(scan.getMaxVersions(),
172           scanInfo.getMaxVersions());
173 
174     // Single branch to deal with two types of reads (columns vs all in family)
175     if (columns == null || columns.size() == 0) {
176       // there is always a null column in the wildcard column query.
177       hasNullColumn = true;
178 
179       // use a specialized scan for wildcard column tracker.
180       this.columns = new ScanWildcardColumnTracker(
181           scanInfo.getMinVersions(), maxVersions, oldestUnexpiredTS);
182     } else {
183       // whether there is null column in the explicit column query
184       hasNullColumn = (columns.first().length == 0);
185 
186       // We can share the ExplicitColumnTracker, diff is we reset
187       // between rows, not between storefiles.
188       this.columns = new ExplicitColumnTracker(columns,
189           scanInfo.getMinVersions(), maxVersions, oldestUnexpiredTS);
190     }
191     this.isReversed = scan.isReversed();
192   }
193 
194   /**
195    * Construct a QueryMatcher for a scan that drop deletes from a limited range of rows.
196    * @param scan
197    * @param scanInfo The store's immutable scan info
198    * @param columns
199    * @param earliestPutTs Earliest put seen in any of the store files.
200    * @param oldestUnexpiredTS the oldest timestamp we are interested in,
201    *  based on TTL
202    * @param dropDeletesFromRow The inclusive left bound of the range; can be EMPTY_START_ROW.
203    * @param dropDeletesToRow The exclusive right bound of the range; can be EMPTY_END_ROW.
204    */
205   public ScanQueryMatcher(Scan scan, ScanInfo scanInfo, NavigableSet<byte[]> columns,
206       long readPointToUse, long earliestPutTs, long oldestUnexpiredTS,
207       byte[] dropDeletesFromRow, byte[] dropDeletesToRow) {
208     this(scan, scanInfo, columns, ScanType.COMPACT_RETAIN_DELETES, readPointToUse, earliestPutTs,
209         oldestUnexpiredTS);
210     Preconditions.checkArgument((dropDeletesFromRow != null) && (dropDeletesToRow != null));
211     this.dropDeletesFromRow = dropDeletesFromRow;
212     this.dropDeletesToRow = dropDeletesToRow;
213   }
214 
215   /*
216    * Constructor for tests
217    */
218   ScanQueryMatcher(Scan scan, ScanInfo scanInfo,
219       NavigableSet<byte[]> columns, long oldestUnexpiredTS) {
220     this(scan, scanInfo, columns, ScanType.USER_SCAN,
221           Long.MAX_VALUE, /* max Readpoint to track versions */
222         HConstants.LATEST_TIMESTAMP, oldestUnexpiredTS);
223   }
224 
225   /**
226    *
227    * @return  whether there is an null column in the query
228    */
229   public boolean hasNullColumnInQuery() {
230     return hasNullColumn;
231   }
232 
233   /**
234    * Determines if the caller should do one of several things:
235    * - seek/skip to the next row (MatchCode.SEEK_NEXT_ROW)
236    * - seek/skip to the next column (MatchCode.SEEK_NEXT_COL)
237    * - include the current KeyValue (MatchCode.INCLUDE)
238    * - ignore the current KeyValue (MatchCode.SKIP)
239    * - got to the next row (MatchCode.DONE)
240    *
241    * @param kv KeyValue to check
242    * @return The match code instance.
243    * @throws IOException in case there is an internal consistency problem
244    *      caused by a data corruption.
245    */
246   public MatchCode match(KeyValue kv) throws IOException {
247     if (filter != null && filter.filterAllRemaining()) {
248       return MatchCode.DONE_SCAN;
249     }
250 
251     byte [] bytes = kv.getBuffer();
252     int offset = kv.getOffset();
253 
254     int keyLength = Bytes.toInt(bytes, offset, Bytes.SIZEOF_INT);
255     offset += KeyValue.ROW_OFFSET;
256 
257     int initialOffset = offset;
258 
259     short rowLength = Bytes.toShort(bytes, offset, Bytes.SIZEOF_SHORT);
260     offset += Bytes.SIZEOF_SHORT;
261 
262     int ret = this.rowComparator.compareRows(row, this.rowOffset, this.rowLength,
263         bytes, offset, rowLength);
264     if (!this.isReversed) {
265       if (ret <= -1) {
266         return MatchCode.DONE;
267       } else if (ret >= 1) {
268         // could optimize this, if necessary?
269         // Could also be called SEEK_TO_CURRENT_ROW, but this
270         // should be rare/never happens.
271         return MatchCode.SEEK_NEXT_ROW;
272       }
273     } else {
274       if (ret <= -1) {
275         return MatchCode.SEEK_NEXT_ROW;
276       } else if (ret >= 1) {
277         return MatchCode.DONE;
278       }
279     }
280 
281 
282     // optimize case.
283     if (this.stickyNextRow)
284         return MatchCode.SEEK_NEXT_ROW;
285 
286     if (this.columns.done()) {
287       stickyNextRow = true;
288       return MatchCode.SEEK_NEXT_ROW;
289     }
290 
291     //Passing rowLength
292     offset += rowLength;
293 
294     //Skipping family
295     byte familyLength = bytes [offset];
296     offset += familyLength + 1;
297 
298     int qualLength = keyLength -
299       (offset - initialOffset) - KeyValue.TIMESTAMP_TYPE_SIZE;
300 
301     long timestamp = Bytes.toLong(bytes, initialOffset + keyLength - KeyValue.TIMESTAMP_TYPE_SIZE);
302     // check for early out based on timestamp alone
303     if (columns.isDone(timestamp)) {
304         return columns.getNextRowOrNextColumn(bytes, offset, qualLength);
305     }
306 
307     /*
308      * The delete logic is pretty complicated now.
309      * This is corroborated by the following:
310      * 1. The store might be instructed to keep deleted rows around.
311      * 2. A scan can optionally see past a delete marker now.
312      * 3. If deleted rows are kept, we have to find out when we can
313      *    remove the delete markers.
314      * 4. Family delete markers are always first (regardless of their TS)
315      * 5. Delete markers should not be counted as version
316      * 6. Delete markers affect puts of the *same* TS
317      * 7. Delete marker need to be version counted together with puts
318      *    they affect
319      */
320     byte type = bytes[initialOffset + keyLength - 1];
321     if (kv.isDelete()) {
322       if (!keepDeletedCells) {
323         // first ignore delete markers if the scanner can do so, and the
324         // range does not include the marker
325         //
326         // during flushes and compactions also ignore delete markers newer
327         // than the readpoint of any open scanner, this prevents deleted
328         // rows that could still be seen by a scanner from being collected
329         boolean includeDeleteMarker = seePastDeleteMarkers ?
330             tr.withinTimeRange(timestamp) :
331             tr.withinOrAfterTimeRange(timestamp);
332         if (includeDeleteMarker
333             && kv.getMvccVersion() <= maxReadPointToTrackVersions) {
334           this.deletes.add(bytes, offset, qualLength, timestamp, type);
335         }
336         // Can't early out now, because DelFam come before any other keys
337       }
338       if (retainDeletesInOutput
339           || (!isUserScan && (EnvironmentEdgeManager.currentTimeMillis() - timestamp) <= timeToPurgeDeletes)
340           || kv.getMvccVersion() > maxReadPointToTrackVersions) {
341         // always include or it is not time yet to check whether it is OK
342         // to purge deltes or not
343         if (!isUserScan) {
344           // if this is not a user scan (compaction), we can filter this deletemarker right here
345           // otherwise (i.e. a "raw" scan) we fall through to normal version and timerange checking
346           return MatchCode.INCLUDE;
347         }
348       } else if (keepDeletedCells) {
349         if (timestamp < earliestPutTs) {
350           // keeping delete rows, but there are no puts older than
351           // this delete in the store files.
352           return columns.getNextRowOrNextColumn(bytes, offset, qualLength);
353         }
354         // else: fall through and do version counting on the
355         // delete markers
356       } else {
357         return MatchCode.SKIP;
358       }
359       // note the following next else if...
360       // delete marker are not subject to other delete markers
361     } else if (!this.deletes.isEmpty()) {
362       DeleteResult deleteResult = deletes.isDeleted(bytes, offset, qualLength,
363           timestamp);
364       switch (deleteResult) {
365         case FAMILY_DELETED:
366         case COLUMN_DELETED:
367           return columns.getNextRowOrNextColumn(bytes, offset, qualLength);
368         case VERSION_DELETED:
369         case FAMILY_VERSION_DELETED:
370           return MatchCode.SKIP;
371         case NOT_DELETED:
372           break;
373         default:
374           throw new RuntimeException("UNEXPECTED");
375         }
376     }
377 
378     int timestampComparison = tr.compare(timestamp);
379     if (timestampComparison >= 1) {
380       return MatchCode.SKIP;
381     } else if (timestampComparison <= -1) {
382       return columns.getNextRowOrNextColumn(bytes, offset, qualLength);
383     }
384 
385     // STEP 1: Check if the column is part of the requested columns
386     MatchCode colChecker = columns.checkColumn(bytes, offset, qualLength, type);
387     if (colChecker == MatchCode.INCLUDE) {
388       ReturnCode filterResponse = ReturnCode.SKIP;
389       // STEP 2: Yes, the column is part of the requested columns. Check if filter is present
390       if (filter != null) {
391         // STEP 3: Filter the key value and return if it filters out
392         filterResponse = filter.filterKeyValue(kv);
393         switch (filterResponse) {
394         case SKIP:
395           return MatchCode.SKIP;
396         case NEXT_COL:
397           return columns.getNextRowOrNextColumn(bytes, offset, qualLength);
398         case NEXT_ROW:
399           stickyNextRow = true;
400           return MatchCode.SEEK_NEXT_ROW;
401         case SEEK_NEXT_USING_HINT:
402           return MatchCode.SEEK_NEXT_USING_HINT;
403         default:
404           //It means it is either include or include and seek next
405           break;
406         }
407       }
408       /*
409        * STEP 4: Reaching this step means the column is part of the requested columns and either
410        * the filter is null or the filter has returned INCLUDE or INCLUDE_AND_NEXT_COL response.
411        * Now check the number of versions needed. This method call returns SKIP, INCLUDE,
412        * INCLUDE_AND_SEEK_NEXT_ROW, INCLUDE_AND_SEEK_NEXT_COL.
413        *
414        * FilterResponse            ColumnChecker               Desired behavior
415        * INCLUDE                   SKIP                        row has already been included, SKIP.
416        * INCLUDE                   INCLUDE                     INCLUDE
417        * INCLUDE                   INCLUDE_AND_SEEK_NEXT_COL   INCLUDE_AND_SEEK_NEXT_COL
418        * INCLUDE                   INCLUDE_AND_SEEK_NEXT_ROW   INCLUDE_AND_SEEK_NEXT_ROW
419        * INCLUDE_AND_SEEK_NEXT_COL SKIP                        row has already been included, SKIP.
420        * INCLUDE_AND_SEEK_NEXT_COL INCLUDE                     INCLUDE_AND_SEEK_NEXT_COL
421        * INCLUDE_AND_SEEK_NEXT_COL INCLUDE_AND_SEEK_NEXT_COL   INCLUDE_AND_SEEK_NEXT_COL
422        * INCLUDE_AND_SEEK_NEXT_COL INCLUDE_AND_SEEK_NEXT_ROW   INCLUDE_AND_SEEK_NEXT_ROW
423        *
424        * In all the above scenarios, we return the column checker return value except for
425        * FilterResponse (INCLUDE_AND_SEEK_NEXT_COL) and ColumnChecker(INCLUDE)
426        */
427       colChecker =
428           columns.checkVersions(bytes, offset, qualLength, timestamp, type,
429             kv.getMvccVersion() > maxReadPointToTrackVersions);
430       //Optimize with stickyNextRow
431       stickyNextRow = colChecker == MatchCode.INCLUDE_AND_SEEK_NEXT_ROW ? true : stickyNextRow;
432       return (filterResponse == ReturnCode.INCLUDE_AND_NEXT_COL &&
433           colChecker == MatchCode.INCLUDE) ? MatchCode.INCLUDE_AND_SEEK_NEXT_COL
434           : colChecker;
435     }
436     stickyNextRow = (colChecker == MatchCode.SEEK_NEXT_ROW) ? true
437         : stickyNextRow;
438     return colChecker;
439   }
440 
441   /** Handle partial-drop-deletes. As we match keys in order, when we have a range from which
442    * we can drop deletes, we can set retainDeletesInOutput to false for the duration of this
443    * range only, and maintain consistency. */
444   private void checkPartialDropDeleteRange(byte [] row, int offset, short length) {
445     // If partial-drop-deletes are used, initially, dropDeletesFromRow and dropDeletesToRow
446     // are both set, and the matcher is set to retain deletes. We assume ordered keys. When
447     // dropDeletesFromRow is leq current kv, we start dropping deletes and reset
448     // dropDeletesFromRow; thus the 2nd "if" starts to apply.
449     if ((dropDeletesFromRow != null)
450         && ((dropDeletesFromRow == HConstants.EMPTY_START_ROW)
451           || (Bytes.compareTo(row, offset, length,
452               dropDeletesFromRow, 0, dropDeletesFromRow.length) >= 0))) {
453       retainDeletesInOutput = false;
454       dropDeletesFromRow = null;
455     }
456     // If dropDeletesFromRow is null and dropDeletesToRow is set, we are inside the partial-
457     // drop-deletes range. When dropDeletesToRow is leq current kv, we stop dropping deletes,
458     // and reset dropDeletesToRow so that we don't do any more compares.
459     if ((dropDeletesFromRow == null)
460         && (dropDeletesToRow != null) && (dropDeletesToRow != HConstants.EMPTY_END_ROW)
461         && (Bytes.compareTo(row, offset, length,
462             dropDeletesToRow, 0, dropDeletesToRow.length) >= 0)) {
463       retainDeletesInOutput = true;
464       dropDeletesToRow = null;
465     }
466   }
467 
468   public boolean moreRowsMayExistAfter(KeyValue kv) {
469     if (this.isReversed) {
470       if (rowComparator.compareRows(kv.getBuffer(), kv.getRowOffset(),
471           kv.getRowLength(), stopRow, 0, stopRow.length) <= 0) {
472         return false;
473       } else {
474         return true;
475       }
476     }
477     if (!Bytes.equals(stopRow , HConstants.EMPTY_END_ROW) &&
478         rowComparator.compareRows(kv.getBuffer(),kv.getRowOffset(),
479             kv.getRowLength(), stopRow, 0, stopRow.length) >= 0) {
480       // KV >= STOPROW
481       // then NO there is nothing left.
482       return false;
483     } else {
484       return true;
485     }
486   }
487 
488   /**
489    * Set current row
490    * @param row
491    */
492   public void setRow(byte [] row, int offset, short length) {
493     checkPartialDropDeleteRange(row, offset, length);
494     this.row = row;
495     this.rowOffset = offset;
496     this.rowLength = length;
497     reset();
498   }
499 
500   public void reset() {
501     this.deletes.reset();
502     this.columns.reset();
503 
504     stickyNextRow = false;
505   }
506 
507   /**
508    *
509    * @return the start key
510    */
511   public KeyValue getStartKey() {
512     return this.startKey;
513   }
514 
515   /**
516    *
517    * @return the Filter
518    */
519   Filter getFilter() {
520     return this.filter;
521   }
522 
523   public Cell getNextKeyHint(Cell kv) throws IOException {
524     if (filter == null) {
525       return null;
526     } else {
527       return filter.getNextCellHint(kv);
528     }
529   }
530 
531   public KeyValue getKeyForNextColumn(KeyValue kv) {
532     ColumnCount nextColumn = columns.getColumnHint();
533     if (nextColumn == null) {
534       return KeyValue.createLastOnRow(
535           kv.getBuffer(), kv.getRowOffset(), kv.getRowLength(),
536           kv.getBuffer(), kv.getFamilyOffset(), kv.getFamilyLength(),
537           kv.getBuffer(), kv.getQualifierOffset(), kv.getQualifierLength());
538     } else {
539       return KeyValue.createFirstOnRow(
540           kv.getBuffer(), kv.getRowOffset(), kv.getRowLength(),
541           kv.getBuffer(), kv.getFamilyOffset(), kv.getFamilyLength(),
542           nextColumn.getBuffer(), nextColumn.getOffset(), nextColumn.getLength());
543     }
544   }
545 
546   public KeyValue getKeyForNextRow(KeyValue kv) {
547     return KeyValue.createLastOnRow(
548         kv.getBuffer(), kv.getRowOffset(), kv.getRowLength(),
549         null, 0, 0,
550         null, 0, 0);
551   }
552 
553   //Used only for testing purposes
554   static MatchCode checkColumn(ColumnTracker columnTracker, byte[] bytes, int offset,
555       int length, long ttl, byte type, boolean ignoreCount) throws IOException {
556     MatchCode matchCode = columnTracker.checkColumn(bytes, offset, length, type);
557     if (matchCode == MatchCode.INCLUDE) {
558       return columnTracker.checkVersions(bytes, offset, length, ttl, type, ignoreCount);
559     }
560     return matchCode;
561   }
562 
563   /**
564    * {@link #match} return codes.  These instruct the scanner moving through
565    * memstores and StoreFiles what to do with the current KeyValue.
566    * <p>
567    * Additionally, this contains "early-out" language to tell the scanner to
568    * move on to the next File (memstore or Storefile), or to return immediately.
569    */
570   public static enum MatchCode {
571     /**
572      * Include KeyValue in the returned result
573      */
574     INCLUDE,
575 
576     /**
577      * Do not include KeyValue in the returned result
578      */
579     SKIP,
580 
581     /**
582      * Do not include, jump to next StoreFile or memstore (in time order)
583      */
584     NEXT,
585 
586     /**
587      * Do not include, return current result
588      */
589     DONE,
590 
591     /**
592      * These codes are used by the ScanQueryMatcher
593      */
594 
595     /**
596      * Done with the row, seek there.
597      */
598     SEEK_NEXT_ROW,
599     /**
600      * Done with column, seek to next.
601      */
602     SEEK_NEXT_COL,
603 
604     /**
605      * Done with scan, thanks to the row filter.
606      */
607     DONE_SCAN,
608 
609     /*
610      * Seek to next key which is given as hint.
611      */
612     SEEK_NEXT_USING_HINT,
613 
614     /**
615      * Include KeyValue and done with column, seek to next.
616      */
617     INCLUDE_AND_SEEK_NEXT_COL,
618 
619     /**
620      * Include KeyValue and done with row, seek to next.
621      */
622     INCLUDE_AND_SEEK_NEXT_ROW,
623   }
624 }