[2/2] phoenix git commit: PHOENIX-1457 Use high priority queue for metadata endpoint calls

2015-03-27 Thread tdsilva
PHOENIX-1457 Use high priority queue for metadata endpoint calls


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

Branch: refs/heads/4.x-HBase-1.x
Commit: f0c2ed4e567eb4efc5a59d70d8880800b144fd09
Parents: 24ee2c6
Author: Thomas D'Silva twdsi...@gmail.com
Authored: Tue Mar 24 17:17:44 2015 -0700
Committer: Thomas tdsi...@salesforce.com
Committed: Fri Mar 27 11:54:40 2015 -0700

--
 .../phoenix/end2end/index/IndexHandlerIT.java   |  12 +-
 .../phoenix/end2end/index/IndexQosIT.java   | 242 ---
 .../apache/phoenix/rpc/PhoenixClientRpcIT.java  | 122 ++
 .../apache/phoenix/rpc/PhoenixServerRpcIT.java  | 235 ++
 .../TestPhoenixIndexRpcSchedulerFactory.java|  64 +
 .../hbase/ipc/PhoenixIndexRpcScheduler.java | 123 --
 .../hadoop/hbase/ipc/PhoenixRpcScheduler.java   | 123 ++
 .../hbase/ipc/PhoenixRpcSchedulerFactory.java   |  95 
 .../controller/ClientRpcControllerFactory.java  |  60 +
 .../ipc/controller/IndexRpcController.java  |  51 
 .../ipc/controller/MetadataRpcController.java   |  55 +
 .../controller/ServerRpcControllerFactory.java  |  62 +
 .../index/IndexQosRpcControllerFactory.java |  82 ---
 .../ipc/PhoenixIndexRpcSchedulerFactory.java|  90 ---
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |   4 -
 .../org/apache/phoenix/query/QueryServices.java |   5 +-
 .../phoenix/query/QueryServicesOptions.java |  12 +-
 .../org/apache/phoenix/util/SchemaUtil.java |   7 -
 .../hbase/ipc/PhoenixIndexRpcSchedulerTest.java |  16 +-
 .../PhoenixIndexRpcSchedulerFactoryTest.java| 106 
 .../PhoenixRpcSchedulerFactoryTest.java | 125 ++
 .../java/org/apache/phoenix/query/BaseTest.java |  12 +-
 22 files changed, 1023 insertions(+), 680 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f0c2ed4e/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexHandlerIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexHandlerIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexHandlerIT.java
index 1507d6b..20a780a 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexHandlerIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexHandlerIT.java
@@ -35,8 +35,8 @@ import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.ipc.DelegatingPayloadCarryingRpcController;
 import org.apache.hadoop.hbase.ipc.PayloadCarryingRpcController;
 import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
+import org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.phoenix.hbase.index.IndexQosRpcControllerFactory;
 import org.apache.phoenix.hbase.index.TableName;
 import org.apache.phoenix.query.QueryServicesOptions;
 import org.junit.After;
@@ -53,11 +53,11 @@ public class IndexHandlerIT {
 
 public static class CountingIndexClientRpcFactory extends 
RpcControllerFactory {
 
-private IndexQosRpcControllerFactory delegate;
+private ServerRpcControllerFactory delegate;
 
 public CountingIndexClientRpcFactory(Configuration conf) {
 super(conf);
-this.delegate = new IndexQosRpcControllerFactory(conf);
+this.delegate = new ServerRpcControllerFactory(conf);
 }
 
 @Override
@@ -146,8 +146,8 @@ public class IndexHandlerIT {
 conf.set(RpcControllerFactory.CUSTOM_CONTROLLER_CONF_KEY,
 CountingIndexClientRpcFactory.class.getName());
 // and set the index table as the current table
-conf.setStrings(IndexQosRpcControllerFactory.INDEX_TABLE_NAMES_KEY,
-TestTable.getTableNameString());
+//conf.setStrings(PhoenixRpcControllerFactory.INDEX_TABLE_NAMES_KEY,
+//TestTable.getTableNameString());
 HTable table = new HTable(conf, TestTable.getTableName());
 
 // do a write to the table
@@ -159,7 +159,7 @@ public class IndexHandlerIT {
 // check the counts on the rpc controller
 assertEquals(Didn't get the expected number of index priority 
writes!, 1,
 (int) CountingIndexClientRpcController.priorityCounts
-.get(QueryServicesOptions.DEFAULT_INDEX_MIN_PRIORITY));
+.get(QueryServicesOptions.DEFAULT_INDEX_PRIORITY));
 
 table.close();
 }


[2/2] phoenix git commit: PHOENIX-1457 Use high priority queue for metadata endpoint calls

2015-03-26 Thread tdsilva
PHOENIX-1457 Use high priority queue for metadata endpoint calls


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

Branch: refs/heads/4.3
Commit: 0b49b28f8c95ca2b5bb75cd115cad0bb3db4118c
Parents: eeff9be
Author: Thomas D'Silva twdsi...@gmail.com
Authored: Tue Mar 24 17:17:44 2015 -0700
Committer: Thomas tdsi...@salesforce.com
Committed: Thu Mar 26 21:32:01 2015 -0700

--
 .../phoenix/end2end/index/IndexHandlerIT.java   |  12 +-
 .../phoenix/end2end/index/IndexQosIT.java   | 240 ---
 .../apache/phoenix/rpc/PhoenixClientRpcIT.java  | 122 ++
 .../apache/phoenix/rpc/PhoenixServerRpcIT.java  | 235 ++
 .../TestPhoenixIndexRpcSchedulerFactory.java|  58 +
 .../hbase/ipc/PhoenixIndexRpcScheduler.java | 123 --
 .../hadoop/hbase/ipc/PhoenixRpcScheduler.java   | 123 ++
 .../hbase/ipc/PhoenixRpcSchedulerFactory.java   |  95 
 .../controller/ClientRpcControllerFactory.java  |  60 +
 .../ipc/controller/IndexRpcController.java  |  51 
 .../ipc/controller/MetadataRpcController.java   |  55 +
 .../controller/ServerRpcControllerFactory.java  |  62 +
 .../index/IndexQosRpcControllerFactory.java |  82 ---
 .../ipc/PhoenixIndexRpcSchedulerFactory.java|  91 ---
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |   4 -
 .../org/apache/phoenix/query/QueryServices.java |   5 +-
 .../phoenix/query/QueryServicesOptions.java |  12 +-
 .../org/apache/phoenix/util/SchemaUtil.java |   7 -
 .../hbase/ipc/PhoenixIndexRpcSchedulerTest.java |  16 +-
 .../PhoenixIndexRpcSchedulerFactoryTest.java| 106 
 .../PhoenixRpcSchedulerFactoryTest.java | 125 ++
 .../java/org/apache/phoenix/query/BaseTest.java |  12 +-
 22 files changed, 1017 insertions(+), 679 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/0b49b28f/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexHandlerIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexHandlerIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexHandlerIT.java
index 1507d6b..20a780a 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexHandlerIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexHandlerIT.java
@@ -35,8 +35,8 @@ import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.ipc.DelegatingPayloadCarryingRpcController;
 import org.apache.hadoop.hbase.ipc.PayloadCarryingRpcController;
 import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
+import org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.phoenix.hbase.index.IndexQosRpcControllerFactory;
 import org.apache.phoenix.hbase.index.TableName;
 import org.apache.phoenix.query.QueryServicesOptions;
 import org.junit.After;
@@ -53,11 +53,11 @@ public class IndexHandlerIT {
 
 public static class CountingIndexClientRpcFactory extends 
RpcControllerFactory {
 
-private IndexQosRpcControllerFactory delegate;
+private ServerRpcControllerFactory delegate;
 
 public CountingIndexClientRpcFactory(Configuration conf) {
 super(conf);
-this.delegate = new IndexQosRpcControllerFactory(conf);
+this.delegate = new ServerRpcControllerFactory(conf);
 }
 
 @Override
@@ -146,8 +146,8 @@ public class IndexHandlerIT {
 conf.set(RpcControllerFactory.CUSTOM_CONTROLLER_CONF_KEY,
 CountingIndexClientRpcFactory.class.getName());
 // and set the index table as the current table
-conf.setStrings(IndexQosRpcControllerFactory.INDEX_TABLE_NAMES_KEY,
-TestTable.getTableNameString());
+//conf.setStrings(PhoenixRpcControllerFactory.INDEX_TABLE_NAMES_KEY,
+//TestTable.getTableNameString());
 HTable table = new HTable(conf, TestTable.getTableName());
 
 // do a write to the table
@@ -159,7 +159,7 @@ public class IndexHandlerIT {
 // check the counts on the rpc controller
 assertEquals(Didn't get the expected number of index priority 
writes!, 1,
 (int) CountingIndexClientRpcController.priorityCounts
-.get(QueryServicesOptions.DEFAULT_INDEX_MIN_PRIORITY));
+.get(QueryServicesOptions.DEFAULT_INDEX_PRIORITY));
 
 table.close();
 }