Repository: phoenix Updated Branches: refs/heads/master 34b8fe86b -> df998e6d7
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/df998e6d Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/df998e6d Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/df998e6d Branch: refs/heads/master Commit: df998e6d7840db4669a395fa6460c42c434af633 Parents: 34b8fe8 Author: Lars Hofhansl <la...@apache.org> Authored: Sun Sep 23 22:33:21 2018 -0700 Committer: Lars Hofhansl <la...@apache.org> Committed: Sun Sep 23 22:33:21 2018 -0700 ---------------------------------------------------------------------- .../phoenix/iterate/RegionScannerFactory.java | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/df998e6d/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 393b850..703c9dc 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 @@ -104,25 +104,10 @@ public abstract class RegionScannerFactory { final ImmutableBytesWritable ptr, final boolean useQualifierAsListIndex) { return new RegionScanner() { - private boolean hasReferences = checkForReferenceFiles(); private RegionInfo 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() { @@ -183,7 +168,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()) {