Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.0 12952f5c9 -> acdf2748f
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/acdf2748 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/acdf2748 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/acdf2748 Branch: refs/heads/4.x-HBase-1.0 Commit: acdf2748fec6734140154f8ef1d7a3105be4a58b Parents: 12952f5 Author: Ankit Singhal <ankitsingha...@gmail.com> Authored: Mon Jun 20 11:42:40 2016 -0700 Committer: Ankit Singhal <ankitsingha...@gmail.com> Committed: Mon Jun 20 11:42:40 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/acdf2748/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 607a556..6325d9a 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"); }