phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamestay...@apache.org
Subject phoenix git commit: PHOENIX-4366 Rebuilding a local index fails sometimes (addendum)
Date Wed, 11 Apr 2018 22:25:38 GMT
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.2 08ee2b481 -> 5d6b39cde


PHOENIX-4366 Rebuilding a local index fails sometimes (addendum)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/5d6b39cd
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/5d6b39cd
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/5d6b39cd

Branch: refs/heads/4.x-HBase-1.2
Commit: 5d6b39cde59bac0f9fd69847487ed2ecf518eff7
Parents: 08ee2b4
Author: James Taylor <jtaylor@salesforce.com>
Authored: Wed Apr 11 15:20:08 2018 -0700
Committer: James Taylor <jtaylor@salesforce.com>
Committed: Wed Apr 11 15:25:25 2018 -0700

----------------------------------------------------------------------
 .../NonAggregateRegionScannerFactory.java       | 36 +++++++++++---------
 1 file changed, 20 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/5d6b39cd/phoenix-core/src/main/java/org/apache/phoenix/iterate/NonAggregateRegionScannerFactory.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/iterate/NonAggregateRegionScannerFactory.java
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/NonAggregateRegionScannerFactory.java
index 90ea025..ba6a08f 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/iterate/NonAggregateRegionScannerFactory.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/iterate/NonAggregateRegionScannerFactory.java
@@ -18,8 +18,15 @@
 
 package org.apache.phoenix.iterate;
 
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
+import static org.apache.phoenix.util.EncodedColumnsUtil.getMinMaxQualifiersFromScan;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
 
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.KeyValue;
@@ -61,15 +68,8 @@ import org.apache.phoenix.util.IndexUtil;
 import org.apache.phoenix.util.ScanUtil;
 import org.apache.phoenix.util.ServerUtil;
 
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import static org.apache.phoenix.util.EncodedColumnsUtil.getMinMaxQualifiersFromScan;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
 
 public class NonAggregateRegionScannerFactory extends RegionScannerFactory {
 
@@ -102,13 +102,17 @@ public class NonAggregateRegionScannerFactory extends RegionScannerFactory
{
     boolean useNewValueColumnQualifier = EncodedColumnsUtil.useNewValueColumnQualifier(scan);
 
     Set<KeyValueColumnExpression> arrayKVRefs = Sets.newHashSet();
+    KeyValueSchema kvSchema = null;
+    ValueBitSet kvSchemaBitSet = null;
     Expression[] arrayFuncRefs = deserializeArrayPositionalExpressionInfoFromScan(scan, innerScanner,
arrayKVRefs);
-    KeyValueSchema.KeyValueSchemaBuilder builder = new KeyValueSchema.KeyValueSchemaBuilder(0);
-    for (Expression expression : arrayFuncRefs) {
-        builder.addField(expression);
+    if (arrayFuncRefs != null) {
+        KeyValueSchema.KeyValueSchemaBuilder builder = new KeyValueSchema.KeyValueSchemaBuilder(0);
+        for (Expression expression : arrayFuncRefs) {
+            builder.addField(expression);
+        }
+        kvSchema = builder.build();
+        kvSchemaBitSet = ValueBitSet.newInstance(kvSchema);
     }
-    KeyValueSchema kvSchema = builder.build();
-    ValueBitSet kvSchemaBitSet = ValueBitSet.newInstance(kvSchema);
     TupleProjector tupleProjector = null;
     Region dataRegion = null;
     IndexMaintainer indexMaintainer = null;


Mime
View raw message