You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ma...@apache.org on 2016/03/29 21:50:51 UTC
[18/30] phoenix git commit: PHOENIX-2756 - FilteredKeyValueScanner
should not implement KeyValueScanner
PHOENIX-2756 - FilteredKeyValueScanner should not implement KeyValueScanner
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/4377e339
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/4377e339
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/4377e339
Branch: refs/heads/calcite
Commit: 4377e3395d7b8107b2b0b3dbe4dff295d355cd0e
Parents: cc98e46
Author: rahul gidwani <rg...@salesforce.com>
Authored: Thu Mar 10 14:45:26 2016 -0800
Committer: Thomas D'Silva <td...@salesforce.com>
Committed: Mon Mar 14 11:41:31 2016 -0700
----------------------------------------------------------------------
.../index/scanner/FilteredKeyValueScanner.java | 56 +-------------------
1 file changed, 1 insertion(+), 55 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/4377e339/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/scanner/FilteredKeyValueScanner.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/scanner/FilteredKeyValueScanner.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/scanner/FilteredKeyValueScanner.java
index 435a1c0..a1cbd61 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/scanner/FilteredKeyValueScanner.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/scanner/FilteredKeyValueScanner.java
@@ -19,12 +19,10 @@
package org.apache.phoenix.hbase.index.scanner;
import java.io.IOException;
-import java.util.SortedSet;
import org.apache.hadoop.hbase.Cell;
import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.KeyValueUtil;
-import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.filter.Filter;
import org.apache.hadoop.hbase.filter.Filter.ReturnCode;
import org.apache.hadoop.hbase.regionserver.KeyValueScanner;
@@ -35,7 +33,7 @@ import org.apache.phoenix.hbase.index.covered.KeyValueStore;
* here because we are only concerned with a single MemStore for the index; we don't need to worry about multiple column
* families or minimizing seeking through file - we just want to iterate the kvs quickly, in-memory.
*/
-public class FilteredKeyValueScanner implements KeyValueScanner {
+public class FilteredKeyValueScanner implements Scanner {
private KeyValueScanner delegate;
private Filter filter;
@@ -102,67 +100,15 @@ public class FilteredKeyValueScanner implements KeyValueScanner {
}
}
- @Override
public boolean reseek(Cell key) throws IOException {
this.delegate.reseek(key);
return this.seekToNextUnfilteredKeyValue();
}
- @Override
- public boolean requestSeek(Cell kv, boolean forward, boolean useBloom) throws IOException {
- return this.reseek(kv);
- }
-
- @Override
- public boolean isFileScanner() {
- return false;
- }
-
- @Override
- public long getSequenceID() {
- return this.delegate.getSequenceID();
- }
-
- @Override
- public boolean shouldUseScanner(Scan scan, SortedSet<byte[]> columns, long oldestUnexpiredTS) {
- throw new UnsupportedOperationException(this.getClass().getName()
- + " doesn't support checking to see if it should use a scanner!");
- }
-
- @Override
- public boolean realSeekDone() {
- return this.delegate.realSeekDone();
- }
-
- @Override
- public void enforceSeek() throws IOException {
- this.delegate.enforceSeek();
- }
@Override
public void close() {
this.delegate.close();
}
- @Override
- public boolean backwardSeek(Cell arg0) throws IOException {
- return this.delegate.backwardSeek(arg0);
- }
-
- @Override
- public boolean seekToLastRow() throws IOException {
- return this.delegate.seekToLastRow();
- }
-
- @Override
- public boolean seekToPreviousRow(Cell arg0) throws IOException {
- return this.delegate.seekToPreviousRow(arg0);
- }
-
- // Added for compatibility with HBASE-13109
- // Once we drop support for older versions, add an @override annotation here
- // and figure out how to get the next indexed key
- public Cell getNextIndexedKey() {
- return null; // indicate that we cannot use the optimization
- }
}