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 <ankitsingha...@gmail.com> Authored: Mon Jun 20 11:43:23 2016 -0700 Committer: Ankit Singhal <ankitsingha...@gmail.com> 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"); }