phoenix git commit: PHOENIX-3008 Prevent upgrade of existing multi-tenant table to map to namespace until we support it correctly

2016-06-20 Thread ankit
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 584a08578 -> 881246531


PHOENIX-3008 Prevent upgrade of existing multi-tenant table to map to namespace 
until we support it correctly


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 881246531f126fc7c2e24f531933865f745e7947
Parents: 584a085
Author: Ankit Singhal 
Authored: Mon Jun 20 11:43:23 2016 -0700
Committer: Ankit Singhal 
Committed: Mon Jun 20 11:43:23 2016 -0700

--
 .../src/main/java/org/apache/phoenix/util/UpgradeUtil.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/88124653/phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java 
b/phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java
index f13334d..ce7c3db 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java
@@ -1512,6 +1512,8 @@ public class UpgradeUtil {
 String schemaName = 
SchemaUtil.getSchemaNameFromFullName(tableName);
 // Confirm table is not already upgraded
 PTable table = PhoenixRuntime.getTable(conn, tableName);
+if (table.isMultiTenant()) { throw new IllegalArgumentException(
+"Sorry!! currently support for upgrading multi-tenant 
table to map to namespace is not supported!!"); }
 // Upgrade is not required if schemaName is not present.
 if (schemaName.equals("") && !PTableType.VIEW
 .equals(table.getType())) { throw new 
IllegalArgumentException("Table doesn't have schema name"); }



phoenix git commit: PHOENIX-3008 Prevent upgrade of existing multi-tenant table to map to namespace until we support it correctly

2016-06-20 Thread ankit
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 817764456 -> 257960b05


PHOENIX-3008 Prevent upgrade of existing multi-tenant table to map to namespace 
until we support it correctly


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 257960b056401602e48dd21089a14a637e11cd94
Parents: 8177644
Author: Ankit Singhal 
Authored: Mon Jun 20 11:42:01 2016 -0700
Committer: Ankit Singhal 
Committed: Mon Jun 20 11:42:01 2016 -0700

--
 .../src/main/java/org/apache/phoenix/util/UpgradeUtil.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/257960b0/phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java 
b/phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java
index 5b81a6c..3c07d95 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java
@@ -1512,6 +1512,8 @@ public class UpgradeUtil {
 String schemaName = 
SchemaUtil.getSchemaNameFromFullName(tableName);
 // Confirm table is not already upgraded
 PTable table = PhoenixRuntime.getTable(conn, tableName);
+if (table.isMultiTenant()) { throw new IllegalArgumentException(
+"Sorry!! currently support for upgrading multi-tenant 
table to map to namespace is not supported!!"); }
 // Upgrade is not required if schemaName is not present.
 if (schemaName.equals("") && !PTableType.VIEW
 .equals(table.getType())) { throw new 
IllegalArgumentException("Table doesn't have schema name"); }



phoenix git commit: PHOENIX-3008 Prevent upgrade of existing multi-tenant table to map to namespace until we support it correctly

2016-06-20 Thread ankit
Repository: phoenix
Updated Branches:
  refs/heads/master e53e3bbb6 -> b78d5b0c1


PHOENIX-3008 Prevent upgrade of existing multi-tenant table to map to namespace 
until we support it correctly


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

Branch: refs/heads/master
Commit: b78d5b0c16911a3925ea5113a325eb5b4f938e2d
Parents: e53e3bb
Author: Ankit Singhal 
Authored: Mon Jun 20 11:41:18 2016 -0700
Committer: Ankit Singhal 
Committed: Mon Jun 20 11:41:18 2016 -0700

--
 .../src/main/java/org/apache/phoenix/util/UpgradeUtil.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b78d5b0c/phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java 
b/phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java
index 5b81a6c..3c07d95 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java
@@ -1512,6 +1512,8 @@ public class UpgradeUtil {
 String schemaName = 
SchemaUtil.getSchemaNameFromFullName(tableName);
 // Confirm table is not already upgraded
 PTable table = PhoenixRuntime.getTable(conn, tableName);
+if (table.isMultiTenant()) { throw new IllegalArgumentException(
+"Sorry!! currently support for upgrading multi-tenant 
table to map to namespace is not supported!!"); }
 // Upgrade is not required if schemaName is not present.
 if (schemaName.equals("") && !PTableType.VIEW
 .equals(table.getType())) { throw new 
IllegalArgumentException("Table doesn't have schema name"); }