Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-4523

phoenix.schema.isNamespaceMappingEnabled problem

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.13.1
    • Fix Version/s: 4.14.0, 4.13.2-cdh5.11.2, 5.0.0
    • Labels:
      None

      Description

      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:

      Caused by: java.sql.SQLException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hbase.TableExistsException): SYSTEM:MUTEX
      	at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2492)
      	at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2384)
      	at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)
      	at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2384)
      	at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:255)
      	at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:150)
      	at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:221)
      	at java.sql.DriverManager.getConnection(DriverManager.java:664)
      	at java.sql.DriverManager.getConnection(DriverManager.java:270)
      

      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

        Attachments

        1. PHOENIX-4523_5.x-HBase-2.0.patch
          8 kB
          Rajeshbabu Chintaguntla
        2. PHOENIX-4523.001.4.x-HBase-0.98.patch
          9 kB
          Karan Mehta
        3. PHOENIX-4523.001.patch
          9 kB
          Karan Mehta

          Issue Links

            Activity

              People

              • Assignee:
                karanmehta93 Karan Mehta
                Reporter:
                f.pompermaier Flavio Pompermaier
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: