[27/30] phoenix git commit: PHOENIX-2774 MemStoreScanner and KeyValueStore should not be aware of KeyValueScanner (Churro Morales)
PHOENIX-2774 MemStoreScanner and KeyValueStore should not be aware of KeyValueScanner (Churro Morales) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/d07fed5e Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/d07fed5e Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/d07fed5e Branch: refs/heads/calcite Commit: d07fed5e997cfcbf48e09516716a919d5e3315cb Parents: 64fdf84 Author: James Taylor Authored: Mon Mar 28 10:39:15 2016 -0700 Committer: James Taylor Committed: Mon Mar 28 10:39:15 2016 -0700 -- .../apache/phoenix/hbase/index/covered/data/IndexMemStore.java | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/d07fed5e/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java index c7c5e3a..5b68fa2 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java @@ -31,7 +31,6 @@ import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.regionserver.IndexKeyValueSkipListSet; import org.apache.hadoop.hbase.regionserver.MemStore; import org.apache.hadoop.hbase.util.Bytes; - import org.apache.phoenix.hbase.index.covered.KeyValueStore; import org.apache.phoenix.hbase.index.covered.LocalTableState; import org.apache.phoenix.hbase.index.scanner.ReseekableScanner; @@ -251,9 +250,7 @@ public class IndexMemStore implements KeyValueStore { * Unfortunately the Java API does not offer a method to get it. So we remember the last keys * we iterated to and restore the reseeked set to at least that point. */ - - KeyValue kv = KeyValueUtil.ensureKeyValue(key); - kvsetIt = kvsetAtCreation.tailSet(getHighest(kv, kvsetItRow)).iterator(); + kvsetIt = kvsetAtCreation.tailSet(getHighest(KeyValueUtil.ensureKeyValue(key), kvsetItRow)).iterator(); return seekInSubLists(); }
[24/30] phoenix git commit: PHOENIX-2774 MemStoreScanner and KeyValueStore should not be aware of KeyValueScanner (Churro Morales)
PHOENIX-2774 MemStoreScanner and KeyValueStore should not be aware of KeyValueScanner (Churro Morales) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/bea110c8 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/bea110c8 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/bea110c8 Branch: refs/heads/calcite Commit: bea110c8e70e26514aa658fb2b02d38d215ae6b4 Parents: cd8e86c Author: James Taylor Authored: Mon Mar 28 08:21:16 2016 -0700 Committer: James Taylor Committed: Mon Mar 28 08:21:16 2016 -0700 -- .../hbase/index/covered/KeyValueStore.java | 4 +- .../hbase/index/covered/LocalTableState.java| 27 .../hbase/index/covered/data/IndexMemStore.java | 43 +++- .../index/scanner/FilteredKeyValueScanner.java | 11 +++-- .../hbase/index/scanner/ReseekableScanner.java | 28 + .../hbase/index/scanner/ScannerBuilder.java | 2 +- .../index/covered/data/TestIndexMemStore.java | 6 +-- 7 files changed, 44 insertions(+), 77 deletions(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/bea110c8/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java index 39f9062..30d2904 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java @@ -18,7 +18,7 @@ package org.apache.phoenix.hbase.index.covered; import org.apache.hadoop.hbase.KeyValue; -import org.apache.hadoop.hbase.regionserver.KeyValueScanner; +import org.apache.phoenix.hbase.index.scanner.ReseekableScanner; /** * Store a collection of KeyValues in memory. @@ -27,7 +27,7 @@ public interface KeyValueStore { public void add(KeyValue kv, boolean overwrite); - public KeyValueScanner getScanner(); + public ReseekableScanner getScanner(); public void rollback(KeyValue kv); } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/phoenix/blob/bea110c8/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java index 2739cc2..3a7a7eb 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java @@ -194,33 +194,6 @@ public class LocalTableState implements TableState { return this.update.getRow(); } -public Result getCurrentRowState() { -KeyValueScanner scanner = this.memstore.getScanner(); -List kvs = new ArrayList(); -while (scanner.peek() != null) { -try { -kvs.add(scanner.next()); -} catch (IOException e) { -// this should never happen - something has gone terribly arwy if it has -throw new RuntimeException("Local MemStore threw IOException!"); -} -} -return Result.create(kvs); -} - -/** - * Helper to add a {@link Mutation} to the values stored for the current row - * - * @param pendingUpdate - *update to apply - */ -public void addUpdateForTesting(Mutation pendingUpdate) { -for (Map.Entry> e : pendingUpdate.getFamilyCellMap().entrySet()) { - List edits = KeyValueUtil.ensureKeyValues(e.getValue()); -addUpdate(edits); -} -} - /** * @param hints */ http://git-wip-us.apache.org/repos/asf/phoenix/blob/bea110c8/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java index 7ae54ad..c7c5e3a 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java @@ -17,7 +17,6 @@ */ package org.apache.phoenix.hbase.index.covered.data; -import java.io.IOException; import java.util.Comparator; import java.util.Iterator; import java.util.Sorte
phoenix git commit: PHOENIX-2774 MemStoreScanner and KeyValueStore should not be aware of KeyValueScanner (Churro Morales)
Repository: phoenix Updated Branches: refs/heads/master 64fdf840b -> d07fed5e9 PHOENIX-2774 MemStoreScanner and KeyValueStore should not be aware of KeyValueScanner (Churro Morales) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/d07fed5e Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/d07fed5e Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/d07fed5e Branch: refs/heads/master Commit: d07fed5e997cfcbf48e09516716a919d5e3315cb Parents: 64fdf84 Author: James Taylor Authored: Mon Mar 28 10:39:15 2016 -0700 Committer: James Taylor Committed: Mon Mar 28 10:39:15 2016 -0700 -- .../apache/phoenix/hbase/index/covered/data/IndexMemStore.java | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/d07fed5e/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java index c7c5e3a..5b68fa2 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java @@ -31,7 +31,6 @@ import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.regionserver.IndexKeyValueSkipListSet; import org.apache.hadoop.hbase.regionserver.MemStore; import org.apache.hadoop.hbase.util.Bytes; - import org.apache.phoenix.hbase.index.covered.KeyValueStore; import org.apache.phoenix.hbase.index.covered.LocalTableState; import org.apache.phoenix.hbase.index.scanner.ReseekableScanner; @@ -251,9 +250,7 @@ public class IndexMemStore implements KeyValueStore { * Unfortunately the Java API does not offer a method to get it. So we remember the last keys * we iterated to and restore the reseeked set to at least that point. */ - - KeyValue kv = KeyValueUtil.ensureKeyValue(key); - kvsetIt = kvsetAtCreation.tailSet(getHighest(kv, kvsetItRow)).iterator(); + kvsetIt = kvsetAtCreation.tailSet(getHighest(KeyValueUtil.ensureKeyValue(key), kvsetItRow)).iterator(); return seekInSubLists(); }
phoenix git commit: PHOENIX-2774 MemStoreScanner and KeyValueStore should not be aware of KeyValueScanner (Churro Morales)
Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 cd492aea0 -> 1df4dce2d PHOENIX-2774 MemStoreScanner and KeyValueStore should not be aware of KeyValueScanner (Churro Morales) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/1df4dce2 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/1df4dce2 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/1df4dce2 Branch: refs/heads/4.x-HBase-0.98 Commit: 1df4dce2d6080af8995254c95496d05f2cdc833a Parents: cd492ae Author: James Taylor Authored: Mon Mar 28 10:38:05 2016 -0700 Committer: James Taylor Committed: Mon Mar 28 10:38:05 2016 -0700 -- .../phoenix/hbase/index/covered/data/IndexMemStore.java | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/1df4dce2/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java index 7676134..7639f9c 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java @@ -220,17 +220,16 @@ public class IndexMemStore implements KeyValueStore { // kvset and snapshot will never be null. // if tailSet can't find anything, SortedSet is empty (not null). - KeyValue kv = KeyValueUtil.ensureKeyValue(key); - kvsetIt = kvsetAtCreation.tailSet(kv).iterator(); + kvsetIt = kvsetAtCreation.tailSet(KeyValueUtil.ensureKeyValue(key)).iterator(); kvsetItRow = null; - return seekInSubLists(kv); + return seekInSubLists(); } /** * (Re)initialize the iterators after a seek or a reseek. */ -private synchronized boolean seekInSubLists(KeyValue key) { +private synchronized boolean seekInSubLists() { nextRow = getNext(kvsetIt); return nextRow != null; } @@ -252,9 +251,8 @@ public class IndexMemStore implements KeyValueStore { * we iterated to and restore the reseeked set to at least that point. */ - KeyValue kv = KeyValueUtil.ensureKeyValue(key); - kvsetIt = kvsetAtCreation.tailSet(getHighest(kv, kvsetItRow)).iterator(); - return seekInSubLists(kv); + kvsetIt = kvsetAtCreation.tailSet(getHighest(KeyValueUtil.ensureKeyValue(key), kvsetItRow)).iterator(); + return seekInSubLists(); } /*
[1/3] phoenix git commit: PHOENIX-2774 MemStoreScanner and KeyValueStore should not be aware of KeyValueScanner (Churro Morales)
Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.0 e49ecec2b -> efa5a222d PHOENIX-2774 MemStoreScanner and KeyValueStore should not be aware of KeyValueScanner (Churro Morales) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/308e282c Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/308e282c Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/308e282c Branch: refs/heads/4.x-HBase-1.0 Commit: 308e282c6d5a59dc64083b51abbe55456b707ec6 Parents: e49ecec Author: James Taylor Authored: Mon Mar 28 09:04:49 2016 -0700 Committer: James Taylor Committed: Mon Mar 28 09:56:05 2016 -0700 -- .../hbase/index/covered/KeyValueStore.java | 4 +- .../hbase/index/covered/LocalTableState.java| 27 .../hbase/index/covered/data/IndexMemStore.java | 44 +++- .../index/scanner/FilteredKeyValueScanner.java | 14 +++ .../hbase/index/scanner/ReseekableScanner.java | 28 + .../hbase/index/scanner/ScannerBuilder.java | 2 +- .../index/covered/data/TestIndexMemStore.java | 6 +-- 7 files changed, 46 insertions(+), 79 deletions(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/308e282c/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java index 39f9062..30d2904 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java @@ -18,7 +18,7 @@ package org.apache.phoenix.hbase.index.covered; import org.apache.hadoop.hbase.KeyValue; -import org.apache.hadoop.hbase.regionserver.KeyValueScanner; +import org.apache.phoenix.hbase.index.scanner.ReseekableScanner; /** * Store a collection of KeyValues in memory. @@ -27,7 +27,7 @@ public interface KeyValueStore { public void add(KeyValue kv, boolean overwrite); - public KeyValueScanner getScanner(); + public ReseekableScanner getScanner(); public void rollback(KeyValue kv); } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/phoenix/blob/308e282c/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java index 2739cc2..3a7a7eb 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java @@ -194,33 +194,6 @@ public class LocalTableState implements TableState { return this.update.getRow(); } -public Result getCurrentRowState() { -KeyValueScanner scanner = this.memstore.getScanner(); -List kvs = new ArrayList(); -while (scanner.peek() != null) { -try { -kvs.add(scanner.next()); -} catch (IOException e) { -// this should never happen - something has gone terribly arwy if it has -throw new RuntimeException("Local MemStore threw IOException!"); -} -} -return Result.create(kvs); -} - -/** - * Helper to add a {@link Mutation} to the values stored for the current row - * - * @param pendingUpdate - *update to apply - */ -public void addUpdateForTesting(Mutation pendingUpdate) { -for (Map.Entry> e : pendingUpdate.getFamilyCellMap().entrySet()) { - List edits = KeyValueUtil.ensureKeyValues(e.getValue()); -addUpdate(edits); -} -} - /** * @param hints */ http://git-wip-us.apache.org/repos/asf/phoenix/blob/308e282c/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java index 7ae54ad..eea1d00 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java @@ -17,7 +17,6 @@ */ package org.apache.phoenix.hbase.index.covered.data; -import java
[1/3] phoenix git commit: PHOENIX-2774 MemStoreScanner and KeyValueStore should not be aware of KeyValueScanner (Churro Morales)
Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 57bd7988c -> cd492aea0 PHOENIX-2774 MemStoreScanner and KeyValueStore should not be aware of KeyValueScanner (Churro Morales) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/a62cde79 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/a62cde79 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/a62cde79 Branch: refs/heads/4.x-HBase-0.98 Commit: a62cde79d3ef48c199aa53867475b290e8d74c30 Parents: 57bd798 Author: James Taylor Authored: Mon Mar 28 09:04:49 2016 -0700 Committer: James Taylor Committed: Mon Mar 28 09:04:49 2016 -0700 -- .../hbase/index/covered/KeyValueStore.java | 4 +- .../hbase/index/covered/LocalTableState.java| 27 - .../hbase/index/covered/data/IndexMemStore.java | 60 +--- .../index/scanner/FilteredKeyValueScanner.java | 21 --- .../hbase/index/scanner/ReseekableScanner.java | 28 + .../hbase/index/scanner/ScannerBuilder.java | 2 +- .../index/covered/data/TestIndexMemStore.java | 7 +-- 7 files changed, 59 insertions(+), 90 deletions(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/a62cde79/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java index 39f9062..30d2904 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java @@ -18,7 +18,7 @@ package org.apache.phoenix.hbase.index.covered; import org.apache.hadoop.hbase.KeyValue; -import org.apache.hadoop.hbase.regionserver.KeyValueScanner; +import org.apache.phoenix.hbase.index.scanner.ReseekableScanner; /** * Store a collection of KeyValues in memory. @@ -27,7 +27,7 @@ public interface KeyValueStore { public void add(KeyValue kv, boolean overwrite); - public KeyValueScanner getScanner(); + public ReseekableScanner getScanner(); public void rollback(KeyValue kv); } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/phoenix/blob/a62cde79/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java index 2739cc2..3a7a7eb 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java @@ -194,33 +194,6 @@ public class LocalTableState implements TableState { return this.update.getRow(); } -public Result getCurrentRowState() { -KeyValueScanner scanner = this.memstore.getScanner(); -List kvs = new ArrayList(); -while (scanner.peek() != null) { -try { -kvs.add(scanner.next()); -} catch (IOException e) { -// this should never happen - something has gone terribly arwy if it has -throw new RuntimeException("Local MemStore threw IOException!"); -} -} -return Result.create(kvs); -} - -/** - * Helper to add a {@link Mutation} to the values stored for the current row - * - * @param pendingUpdate - *update to apply - */ -public void addUpdateForTesting(Mutation pendingUpdate) { -for (Map.Entry> e : pendingUpdate.getFamilyCellMap().entrySet()) { - List edits = KeyValueUtil.ensureKeyValues(e.getValue()); -addUpdate(edits); -} -} - /** * @param hints */ http://git-wip-us.apache.org/repos/asf/phoenix/blob/a62cde79/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java index 89489ec..7676134 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java @@ -17,24 +17,23 @@ */ package org.apache.phoenix.hbase.index.covered.data; -import java.io
[1/3] phoenix git commit: PHOENIX-2774 MemStoreScanner and KeyValueStore should not be aware of KeyValueScanner (Churro Morales)
Repository: phoenix Updated Branches: refs/heads/master cd8e86ca7 -> 64fdf840b PHOENIX-2774 MemStoreScanner and KeyValueStore should not be aware of KeyValueScanner (Churro Morales) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/bea110c8 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/bea110c8 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/bea110c8 Branch: refs/heads/master Commit: bea110c8e70e26514aa658fb2b02d38d215ae6b4 Parents: cd8e86c Author: James Taylor Authored: Mon Mar 28 08:21:16 2016 -0700 Committer: James Taylor Committed: Mon Mar 28 08:21:16 2016 -0700 -- .../hbase/index/covered/KeyValueStore.java | 4 +- .../hbase/index/covered/LocalTableState.java| 27 .../hbase/index/covered/data/IndexMemStore.java | 43 +++- .../index/scanner/FilteredKeyValueScanner.java | 11 +++-- .../hbase/index/scanner/ReseekableScanner.java | 28 + .../hbase/index/scanner/ScannerBuilder.java | 2 +- .../index/covered/data/TestIndexMemStore.java | 6 +-- 7 files changed, 44 insertions(+), 77 deletions(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/bea110c8/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java index 39f9062..30d2904 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/KeyValueStore.java @@ -18,7 +18,7 @@ package org.apache.phoenix.hbase.index.covered; import org.apache.hadoop.hbase.KeyValue; -import org.apache.hadoop.hbase.regionserver.KeyValueScanner; +import org.apache.phoenix.hbase.index.scanner.ReseekableScanner; /** * Store a collection of KeyValues in memory. @@ -27,7 +27,7 @@ public interface KeyValueStore { public void add(KeyValue kv, boolean overwrite); - public KeyValueScanner getScanner(); + public ReseekableScanner getScanner(); public void rollback(KeyValue kv); } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/phoenix/blob/bea110c8/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java index 2739cc2..3a7a7eb 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java @@ -194,33 +194,6 @@ public class LocalTableState implements TableState { return this.update.getRow(); } -public Result getCurrentRowState() { -KeyValueScanner scanner = this.memstore.getScanner(); -List kvs = new ArrayList(); -while (scanner.peek() != null) { -try { -kvs.add(scanner.next()); -} catch (IOException e) { -// this should never happen - something has gone terribly arwy if it has -throw new RuntimeException("Local MemStore threw IOException!"); -} -} -return Result.create(kvs); -} - -/** - * Helper to add a {@link Mutation} to the values stored for the current row - * - * @param pendingUpdate - *update to apply - */ -public void addUpdateForTesting(Mutation pendingUpdate) { -for (Map.Entry> e : pendingUpdate.getFamilyCellMap().entrySet()) { - List edits = KeyValueUtil.ensureKeyValues(e.getValue()); -addUpdate(edits); -} -} - /** * @param hints */ http://git-wip-us.apache.org/repos/asf/phoenix/blob/bea110c8/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java -- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java index 7ae54ad..c7c5e3a 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java @@ -17,7 +17,6 @@ */ package org.apache.phoenix.hbase.index.covered.data; -import java.io.IOException;