You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by sa...@apache.org on 2016/11/08 00:48:56 UTC

[1/2] phoenix git commit: PHOENIX-3462 BaseLocalIndexIT is changing server side properties of the shared test cluster

Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 9582d0eaf -> b1063479c


PHOENIX-3462 BaseLocalIndexIT is changing server side properties of the shared test cluster


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

Branch: refs/heads/4.x-HBase-0.98
Commit: c030eedd16e1fbaaa7d4a444aed24dab3cbe2b2a
Parents: 9582d0e
Author: Samarth <sa...@salesforce.com>
Authored: Mon Nov 7 16:48:33 2016 -0800
Committer: Samarth <sa...@salesforce.com>
Committed: Mon Nov 7 16:48:33 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/phoenix/end2end/index/BaseLocalIndexIT.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c030eedd/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseLocalIndexIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseLocalIndexIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseLocalIndexIT.java
index e818665..a30377b 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseLocalIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseLocalIndexIT.java
@@ -25,7 +25,7 @@ import java.util.Collection;
 import java.util.Map;
 import java.util.Properties;
 
-import org.apache.phoenix.end2end.ParallelStatsDisabledIT;
+import org.apache.phoenix.end2end.BaseOwnClusterIT;
 import org.apache.phoenix.query.BaseTest;
 import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.util.PropertiesUtil;
@@ -40,7 +40,7 @@ import org.junit.runners.Parameterized.Parameters;
 import com.google.common.collect.Maps;
 
 @RunWith(Parameterized.class)
-public abstract class BaseLocalIndexIT extends ParallelStatsDisabledIT {
+public abstract class BaseLocalIndexIT extends BaseOwnClusterIT {
     protected boolean isNamespaceMapped;
     protected String schemaName;
 


[2/2] phoenix git commit: PHOENIX-3463 ViewIndexIT#testUpdateOnTenantViewWithGlobalView doesn't test namespace mapping correctly

Posted by sa...@apache.org.
PHOENIX-3463 ViewIndexIT#testUpdateOnTenantViewWithGlobalView doesn't test namespace mapping correctly


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

Branch: refs/heads/4.x-HBase-0.98
Commit: b1063479ccdc2e6e088c00b34bf2704732da0e24
Parents: c030eed
Author: Samarth <sa...@salesforce.com>
Authored: Mon Nov 7 16:48:47 2016 -0800
Committer: Samarth <sa...@salesforce.com>
Committed: Mon Nov 7 16:48:47 2016 -0800

----------------------------------------------------------------------
 .../apache/phoenix/end2end/index/ViewIndexIT.java  | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b1063479/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
index 46aefff..25cb632 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
@@ -317,8 +317,7 @@ public class ViewIndexIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testUpdateOnTenantViewWithGlobalView() throws Exception {
-        Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-        Connection conn = DriverManager.getConnection(getUrl(), props);
+        Connection conn = getConnection();
         String baseSchemaName = "PLATFORM_ENTITY";
         String baseTableName = generateUniqueName();
         String baseFullName = SchemaUtil.getTableName(baseSchemaName, baseTableName);
@@ -328,6 +327,9 @@ public class ViewIndexIT extends ParallelStatsDisabledIT {
         String tsViewTableName = "TSV_" + generateUniqueName();
         String tsViewFullName = SchemaUtil.getTableName(baseSchemaName, tsViewTableName);
         try {
+            if (isNamespaceMapped) {
+                conn.createStatement().execute("CREATE SCHEMA IF NOT EXISTS " + baseSchemaName);
+            }
             conn.createStatement().execute(
                     "CREATE TABLE " + baseFullName + "(\n" + "    ORGANIZATION_ID CHAR(15) NOT NULL,\n"
                             + "    KEY_PREFIX CHAR(3) NOT NULL,\n" + "    CREATED_DATE DATE,\n"
@@ -360,21 +362,22 @@ public class ViewIndexIT extends ParallelStatsDisabledIT {
             tsConn.createStatement().execute("UPSERT INTO " + tsViewFullName + "(INT1,DOUBLE1,IS_BOOLEAN,TEXT1) VALUES (10,10.0, true, 'j')");
             tsConn.commit();
             
-            assertRowCount(tsConn, tsViewFullName, baseFullName, 10);
+            String basePhysicalName = SchemaUtil.getPhysicalHBaseTableName(baseFullName, isNamespaceMapped, PTableType.TABLE).getString();
+            assertRowCount(tsConn, tsViewFullName, basePhysicalName, 10);
             
             tsConn.createStatement().execute("DELETE FROM " + tsViewFullName + " WHERE TEXT1='d'");
             tsConn.commit();
-            assertRowCount(tsConn, tsViewFullName, baseFullName, 9);
+            assertRowCount(tsConn, tsViewFullName, basePhysicalName, 9);
 
             tsConn.createStatement().execute("DELETE FROM " + tsViewFullName + " WHERE INT1=2");
             tsConn.commit();
-            assertRowCount(tsConn, tsViewFullName, baseFullName, 8);
+            assertRowCount(tsConn, tsViewFullName, basePhysicalName, 8);
             
             // Use different connection for delete
             Connection tsConn2 = DriverManager.getConnection(getUrl(), tsProps);
             tsConn2.createStatement().execute("DELETE FROM " + tsViewFullName + " WHERE DOUBLE1 > 7.5 AND DOUBLE1 < 9.5");
             tsConn2.commit();
-            assertRowCount(tsConn2, tsViewFullName, baseFullName, 6);
+            assertRowCount(tsConn2, tsViewFullName, basePhysicalName, 6);
             
             tsConn2.createStatement().execute("DROP VIEW " + tsViewFullName);
             // Should drop view and index and remove index data
@@ -400,7 +403,7 @@ public class ViewIndexIT extends ParallelStatsDisabledIT {
             conn.createStatement().execute(
                     "CREATE INDEX " + indexName + " \n" + "ON " + viewFullName + " (TEXT1 DESC, INT1)\n"
                             + "INCLUDE (CREATED_BY, DOUBLE1, IS_BOOLEAN, CREATED_DATE)");
-            assertRowCount(tsConn3, tsViewFullName, baseFullName, 0);
+            assertRowCount(tsConn3, tsViewFullName, basePhysicalName, 0);
             
             tsConn.close();
             tsConn2.close();