Repository: phoenix Updated Branches: refs/heads/4.14-HBase-1.2 16613da6f -> 022a2e86d
After HBASE-20940 any local index query will open all HFiles of every Region involved in the query. Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/022a2e86 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/022a2e86 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/022a2e86 Branch: refs/heads/4.14-HBase-1.2 Commit: 022a2e86d4cc25c8a62e0468551701adfb947dc8 Parents: 16613da Author: Lars Hofhansl <la...@apache.org> Authored: Sun Sep 23 22:35:38 2018 -0700 Committer: Vincent Poon <vincentp...@apache.org> Committed: Fri Sep 28 14:57:29 2018 -0700 ---------------------------------------------------------------------- .../phoenix/iterate/RegionScannerFactory.java | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/022a2e86/phoenix-core/src/main/java/org/apache/phoenix/iterate/RegionScannerFactory.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/iterate/RegionScannerFactory.java b/phoenix-core/src/main/java/org/apache/phoenix/iterate/RegionScannerFactory.java index aed5805..d81224d 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/iterate/RegionScannerFactory.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/iterate/RegionScannerFactory.java @@ -37,7 +37,6 @@ import org.apache.phoenix.hbase.index.covered.update.ColumnReference; import org.apache.phoenix.index.IndexMaintainer; import org.apache.phoenix.query.QueryConstants; import org.apache.phoenix.schema.KeyValueSchema; -import org.apache.phoenix.schema.PTable; import org.apache.phoenix.schema.ValueBitSet; import org.apache.phoenix.schema.tuple.*; import org.apache.phoenix.transaction.PhoenixTransactionContext; @@ -45,7 +44,6 @@ import org.apache.phoenix.util.EncodedColumnsUtil; import org.apache.phoenix.util.IndexUtil; import org.apache.phoenix.util.ScanUtil; import org.apache.phoenix.util.ServerUtil; -import org.apache.tephra.Transaction; import java.io.IOException; import java.util.List; @@ -103,25 +101,10 @@ public abstract class RegionScannerFactory { final ImmutableBytesWritable ptr, final boolean useQualifierAsListIndex) { return new RegionScanner() { - private boolean hasReferences = checkForReferenceFiles(); private HRegionInfo regionInfo = env.getRegionInfo(); private byte[] actualStartKey = getActualStartKey(); private boolean useNewValueColumnQualifier = EncodedColumnsUtil.useNewValueColumnQualifier(scan); - // If there are any reference files after local index region merge some cases we might - // get the records less than scan start row key. This will happen when we replace the - // actual region start key with merge region start key. This method gives whether are - // there any reference files in the region or not. - private boolean checkForReferenceFiles() { - if(!ScanUtil.isLocalIndex(scan)) return false; - for (byte[] family : scan.getFamilies()) { - if (getRegion().getStore(family).hasReferences()) { - return true; - } - } - return false; - } - // Get the actual scan start row of local index. This will be used to compare the row // key of the results less than scan start row when there are references. public byte[] getActualStartKey() { @@ -182,7 +165,7 @@ public abstract class RegionScannerFactory { arrayElementCell = result.get(arrayElementCellPosition); } if (ScanUtil.isLocalIndex(scan) && !ScanUtil.isAnalyzeTable(scan)) { - if(hasReferences && actualStartKey!=null) { + if(actualStartKey!=null) { next = scanTillScanStartRow(s, arrayKVRefs, arrayFuncRefs, result, null, arrayElementCell); if (result.isEmpty()) {