You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2014/10/16 07:42:33 UTC

[jira] [Commented] (PHOENIX-1214) SYSTEM.CATALOG cannot be created when first connection to cluster is tenant-specific

    [ https://issues.apache.org/jira/browse/PHOENIX-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14173398#comment-14173398 ] 

Hudson commented on PHOENIX-1214:
---------------------------------

SUCCESS: Integrated in Phoenix | Master #429 (See [https://builds.apache.org/job/Phoenix-master/429/])
PHOENIX-1214 SYSTEM.CATALOG cannot be created when first connection to cluster is tenant-specific (Jan Van Besien) (jtaylor: rev e1da2c34b987a033c2c4a8767b7fc93e0404f730)
* phoenix-core/src/test/java/org/apache/phoenix/util/JDBCUtilTest.java
* phoenix-core/src/it/java/org/apache/phoenix/end2end/CSVCommonsLoaderIT.java
* phoenix-core/src/main/java/org/apache/phoenix/util/JDBCUtil.java
* phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixDriverTest.java
* phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
* phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java


> SYSTEM.CATALOG cannot be created when first connection to cluster is tenant-specific
> ------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-1214
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1214
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Eli Levine
>            Assignee: Jan Van Besien
>         Attachments: 0001-PHOENIX-1214-support-tenant-specific-initial-connect.patch, csvloader_multitenancy_test.patch
>
>
> Reported by [~janvanbesien@ngdata.com]:
> The problem seems to be that it is impossible to create a tenant
> specific connection if the same driver instance hasn't previously been
> used to create a global connection.
> To reproduce:
> - connect to a running hbase with a non-tenant specific connection
> (using sqlline or squirrel or whatever you want)
> - create a multitenant table
> - close the connection and make a new tenant specific connection from
> within a new JVM (otherwise the driver instance is reused). When using
> squirrel, this implies restarting the app
> This fails with
> {code}
> Caused by: java.sql.SQLException: ERROR 1030 (42Y89): Cannot create
> table for tenant-specific connection tableName=SYSTEM.CATALOG
> at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:309)
> at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:133)
> at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:873)
> at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:422)
> at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:183)
> at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:246)
> at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:236)
> at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:54)
> at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:235)
> at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:935)
> at org.apache.phoenix.query.ConnectionQueryServicesImpl$9.call(ConnectionQueryServicesImpl.java:1462)
> at org.apache.phoenix.query.ConnectionQueryServicesImpl$9.call(ConnectionQueryServicesImpl.java:1428)
> at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:54)
> at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1428)
> at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:131)
> at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:112)
> at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133)
> at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167)
> ... 7 more
> {code}
> When reusing the driver instance, this works. I think it has to do
> with the logic around the check for "initialized" in
> ConnectionQueryServicesImpl but I didn't dig any further.
> thanks
> Jan



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)