You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by pb...@apache.org on 2018/10/17 19:24:58 UTC
[27/32] phoenix git commit: After HBASE-20940 any local index query
will open all HFiles of every Region involved in the query.
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/e1de7188
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/e1de7188
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/e1de7188
Branch: refs/heads/4.14-cdh5.11
Commit: e1de718829f83d106c3289d936c0778a16b6785e
Parents: 36803f7
Author: Lars Hofhansl <la...@apache.org>
Authored: Mon Sep 24 06:35:38 2018 +0100
Committer: Pedro Boado <pb...@apache.org>
Committed: Wed Oct 17 20:23:29 2018 +0100
----------------------------------------------------------------------
.../phoenix/iterate/RegionScannerFactory.java | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/e1de7188/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()) {