You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ja...@apache.org on 2018/10/02 15:31:29 UTC
[2/9] 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/ed436606
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/ed436606
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/ed436606
Branch: refs/heads/omid2
Commit: ed4366063b983270767757d12daf3a8f4b126897
Parents: 04931f1
Author: Lars Hofhansl <la...@apache.org>
Authored: Sun Sep 23 22:35:07 2018 -0700
Committer: Lars Hofhansl <la...@apache.org>
Committed: Sun Sep 23 22:35:07 2018 -0700
----------------------------------------------------------------------
.../phoenix/iterate/RegionScannerFactory.java | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/ed436606/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 b47d6b8..0f94038 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()) {