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-2586 Pass cloned BaseResultIterators mutationState through TableResultIteratorFactory
Date Sun, 10 Jan 2016 20:37:58 GMT
Repository: phoenix
Updated Branches:
  refs/heads/master 150a50e40 -> 42736973b


PHOENIX-2586 Pass cloned BaseResultIterators mutationState through TableResultIteratorFactory


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

Branch: refs/heads/master
Commit: 42736973bb9bc79490998d7906219ad14f1fb07d
Parents: 150a50e
Author: James Taylor <jtaylor@salesforce.com>
Authored: Sun Jan 10 12:24:22 2016 -0800
Committer: James Taylor <jtaylor@salesforce.com>
Committed: Sun Jan 10 12:37:51 2016 -0800

----------------------------------------------------------------------
 .../iterate/DelayedTableResultIteratorFactory.java        | 10 +++++-----
 .../iterate/DefaultTableResultIteratorFactory.java        |  6 +++---
 .../org/apache/phoenix/iterate/ParallelIterators.java     |  2 +-
 .../phoenix/iterate/TableResultIteratorFactory.java       |  4 ++--
 4 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/42736973/phoenix-core/src/it/java/org/apache/phoenix/iterate/DelayedTableResultIteratorFactory.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/iterate/DelayedTableResultIteratorFactory.java
b/phoenix-core/src/it/java/org/apache/phoenix/iterate/DelayedTableResultIteratorFactory.java
index 6545a45..0b2c250 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/iterate/DelayedTableResultIteratorFactory.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/iterate/DelayedTableResultIteratorFactory.java
@@ -22,7 +22,7 @@ import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.hadoop.hbase.client.Scan;
-import org.apache.phoenix.compile.StatementContext;
+import org.apache.phoenix.execute.MutationState;
 import org.apache.phoenix.monitoring.CombinableMetric;
 import org.apache.phoenix.schema.TableRef;
 import org.apache.phoenix.schema.tuple.Tuple;
@@ -36,14 +36,14 @@ public class DelayedTableResultIteratorFactory implements TableResultIteratorFac
     }
     
     @Override
-    public TableResultIterator newIterator(StatementContext context, TableRef tableRef, Scan
scan,
+    public TableResultIterator newIterator(MutationState mutationState, TableRef tableRef,
Scan scan,
             CombinableMetric scanMetrics, long renewLeaseThreshold) throws SQLException {
-        return new DelayedTableResultIterator(context, tableRef, scan, scanMetrics, renewLeaseThreshold);
+        return new DelayedTableResultIterator(mutationState, tableRef, scan, scanMetrics,
renewLeaseThreshold);
     }
     
     private class DelayedTableResultIterator extends TableResultIterator {
-        public DelayedTableResultIterator (StatementContext context, TableRef tableRef, Scan
scan, CombinableMetric scanMetrics, long renewLeaseThreshold) throws SQLException {
-            super(context.getConnection().getMutationState(), tableRef, scan, scanMetrics,
renewLeaseThreshold);
+        public DelayedTableResultIterator (MutationState mutationState, TableRef tableRef,
Scan scan, CombinableMetric scanMetrics, long renewLeaseThreshold) throws SQLException {
+            super(mutationState, tableRef, scan, scanMetrics, renewLeaseThreshold);
         }
         
         @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/42736973/phoenix-core/src/main/java/org/apache/phoenix/iterate/DefaultTableResultIteratorFactory.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/iterate/DefaultTableResultIteratorFactory.java
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/DefaultTableResultIteratorFactory.java
index 6a0c78f..2258caf 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/iterate/DefaultTableResultIteratorFactory.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/iterate/DefaultTableResultIteratorFactory.java
@@ -20,16 +20,16 @@ package org.apache.phoenix.iterate;
 import java.sql.SQLException;
 
 import org.apache.hadoop.hbase.client.Scan;
-import org.apache.phoenix.compile.StatementContext;
+import org.apache.phoenix.execute.MutationState;
 import org.apache.phoenix.monitoring.CombinableMetric;
 import org.apache.phoenix.schema.TableRef;
 
 public class DefaultTableResultIteratorFactory implements TableResultIteratorFactory {
 
     @Override
-    public TableResultIterator newIterator(StatementContext context, TableRef tableRef, Scan
scan,
+    public TableResultIterator newIterator(MutationState mutationState, TableRef tableRef,
Scan scan,
             CombinableMetric scanMetrics, long renewLeaseThreshold) throws SQLException {
-        return new TableResultIterator(context.getConnection().getMutationState(), tableRef,
scan, scanMetrics, renewLeaseThreshold);
+        return new TableResultIterator(mutationState, tableRef, scan, scanMetrics, renewLeaseThreshold);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/42736973/phoenix-core/src/main/java/org/apache/phoenix/iterate/ParallelIterators.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/iterate/ParallelIterators.java
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/ParallelIterators.java
index 64c97c7..4339b05 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/iterate/ParallelIterators.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/iterate/ParallelIterators.java
@@ -98,7 +98,7 @@ public class ParallelIterators extends BaseResultIterators {
             final Scan scan = scanLocation.getScan();
             final CombinableMetric scanMetrics = readMetrics.allotMetric(MetricType.SCAN_BYTES,
physicalTableName);
             final TaskExecutionMetricsHolder taskMetrics = new TaskExecutionMetricsHolder(readMetrics,
physicalTableName);
-            final TableResultIterator tableResultItr = context.getConnection().getTableResultIteratorFactory().newIterator(context,
tableRef, scan, scanMetrics, renewLeaseThreshold);
+            final TableResultIterator tableResultItr = context.getConnection().getTableResultIteratorFactory().newIterator(mutationState,
tableRef, scan, scanMetrics, renewLeaseThreshold);
             context.getConnection().addIterator(tableResultItr);
             Future<PeekingResultIterator> future = executor.submit(Tracing.wrap(new
JobCallable<PeekingResultIterator>() {
                 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/42736973/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIteratorFactory.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIteratorFactory.java
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIteratorFactory.java
index 083daf1..0f5ac9b 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIteratorFactory.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIteratorFactory.java
@@ -20,10 +20,10 @@ package org.apache.phoenix.iterate;
 import java.sql.SQLException;
 
 import org.apache.hadoop.hbase.client.Scan;
-import org.apache.phoenix.compile.StatementContext;
+import org.apache.phoenix.execute.MutationState;
 import org.apache.phoenix.monitoring.CombinableMetric;
 import org.apache.phoenix.schema.TableRef;
 
 public interface TableResultIteratorFactory {
-    public TableResultIterator newIterator(StatementContext context, TableRef tableRef, Scan
scan, CombinableMetric scanMetrics, long renewLeaseThreshold) throws SQLException;       

+    public TableResultIterator newIterator(MutationState mutationState, TableRef tableRef,
Scan scan, CombinableMetric scanMetrics, long renewLeaseThreshold) throws SQLException;  
     
 }


Mime
View raw message