phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-4523) phoenix.schema.isNamespaceMappingEnabled problem
Date Wed, 10 Jan 2018 18:37:00 GMT


James Taylor commented on PHOENIX-4523:

So it appears that in the case of a cluster that hasn't been upgraded yet, there are problems
with the execution of the ensureSystemTablesMigratedToSystemNamespace(). In particular, the
call within that method to {{createSysMutexTable}} is failing in an unexpected way.

Some questions/comments:
- can we do a little refactoring and call a new method instead of {{createSysMutexTable}}
that doesn't again check for the existence of SYSTEM.MUTEX (since we already check before
calling {{createSysMutexTable}}?
- why in {{createSysMutexTable}} do we call {{admin.listTableNames()}} and then one line later
call {{admin.tableExists()}}? That seems like a complete waste.
- can we guard against this apparent HBase bug in which a TableExistsException isn't being
thrown as expected within {{createSysMutexTable}} by catching the RemoteException (or maybe
any RuntimeException) and checking that the cause isn't TableExistsException?

Does this give you enough info to go on, [~karanmehta93]? [~f.pompermaier] - would you be
willing to verify a patch from Karan fixes the issue to save time?

> phoenix.schema.isNamespaceMappingEnabled problem
> ------------------------------------------------
>                 Key: PHOENIX-4523
>                 URL:
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.13.1
>            Reporter: Flavio Pompermaier
>            Assignee: Karan Mehta
> I'm using Phoenix 4.13 for CDH 5.11.2 parcel and enabling schemas made my code unusable.
> I think that this is not a bug of the CDH release, but of all 4.13.x releases.
> I have many parallel Phoenix connections and I always get the following exception:
> {code:java}
> Caused by: java.sql.SQLException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hbase.TableExistsException):
> 	at org.apache.phoenix.query.ConnectionQueryServicesImpl$
> 	at org.apache.phoenix.query.ConnectionQueryServicesImpl$
> 	at
> 	at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(
> 	at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(
> 	at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(
> 	at org.apache.phoenix.jdbc.PhoenixDriver.connect(
> 	at java.sql.DriverManager.getConnection(
> 	at java.sql.DriverManager.getConnection(
> {code}
> This is caused by the fact that all the times the SYSTEM tables are recreated, and this
cannot be done simultaneously.
> Trying to debug the issue I found that in ConnectionQueryServicesImpl.createSysMutexTable()
the call to getSystemTableNames() always return an empty array and the SYSTEM:MUTEX  table
is always recreated.
> This because getSystemTableNames() doesn't consider the case when system tables have
namespace enabled. Right now that method tries to get all tables starting with *SYSTEM.\**,
while it should try to get the list of *SYSTEM:\** tables..
> I hope this could get fixed very soon,
> Flavio

This message was sent by Atlassian JIRA

View raw message