Hive
  1. Hive
  2. HIVE-3460

Simultaneous attempts to initialize the Hive Metastore can fail due to error "Table 'metastore_DELETEME1347565995856' doesn't exist"

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.8.1
    • Fix Version/s: None
    • Component/s: Metastore
    • Labels:
      None

      Description

      If multiple clients attempt to access/initialize the Hive Metastore at the same time they can fail due to error "Table 'metastore_DELETEME1347565995856' doesn't exist". A common scenario where this could happen is if there is a central mysql metastore and clients from multiple machines attempt to read from the metastore at the same time. This is outside of a standalone Hive Server install scenario.

      I believe this is not actually a Hive bug, but instead a Data Nucleus issue.

      Exception in thread "main" javax.jdo.JDODataStoreException: Exception thrown obtaining schema column information from datastore
              at org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:313)
              at org.datanucleus.ObjectManagerImpl.getExtent(ObjectManagerImpl.java:4154)
              at org.datanucleus.store.rdbms.query.legacy.JDOQLQueryCompiler.compileCandidates(JDOQLQueryCompiler.java:411)
              at org.datanucleus.store.rdbms.query.legacy.QueryCompiler.executionCompile(QueryCompiler.java:312)
              at org.datanucleus.store.rdbms.query.legacy.JDOQLQueryCompiler.compile(JDOQLQueryCompiler.java:225)
              at org.datanucleus.store.rdbms.query.legacy.JDOQLQuery.compileInternal(JDOQLQuery.java:175)
              at org.datanucleus.store.query.Query.executeQuery(Query.java:1628)
              at org.datanucleus.store.rdbms.query.legacy.JDOQLQuery.executeQuery(JDOQLQuery.java:245)
              at org.datanucleus.store.query.Query.executeWithArray(Query.java:1499)
              at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:243)
              at org.apache.hadoop.hive.metastore.ObjectStore.getMDatabase(ObjectStore.java:389)
              at org.apache.hadoop.hive.metastore.ObjectStore.getDatabase(ObjectStore.java:408)
              at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB_core(HiveMetaStore.java:485)
              at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.access$300(HiveMetaStore.java:141)
              at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler$5.run(HiveMetaStore.java:507)
              at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler$5.run(HiveMetaStore.java:504)
              at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.executeWithRetry(HiveMetaStore.java:360)
              at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:504)
              at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:266)
              at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.<init>(HiveMetaStore.java:228)
              at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:114)
              at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:98)
      
      
      NestedThrowablesStackTrace:
      com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'metastore_DELETEME1347565995856' doesn't exist
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
              at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
              at com.mysql.jdbc.Util.getInstance(Util.java:381)
              at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
              at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
              at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
              at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2637)
              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2566)
              at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1464)
              at com.mysql.jdbc.DatabaseMetaData$2.forEach(DatabaseMetaData.java:2472)
              at com.mysql.jdbc.IterateBlock.doForAll(IterateBlock.java:50)
              at com.mysql.jdbc.DatabaseMetaData.getColumns(DatabaseMetaData.java:2346)
              at org.apache.commons.dbcp.DelegatingDatabaseMetaData.getColumns(DelegatingDatabaseMetaData.java:218)
              at org.datanucleus.store.rdbms.adapter.DatabaseAdapter.getColumns(DatabaseAdapter.java:1460)
              at org.datanucleus.store.rdbms.schema.RDBMSSchemaHandler.refreshTableData(RDBMSSchemaHandler.java:924)
              at org.datanucleus.store.rdbms.schema.RDBMSSchemaHandler.getRDBMSTableInfoForTable(RDBMSSchemaHandler.java:823)
              at org.datanucleus.store.rdbms.schema.RDBMSSchemaHandler.getRDBMSTableInfoForTable(RDBMSSchemaHandler.java:772)
              at org.datanucleus.store.rdbms.schema.RDBMSSchemaHandler.getSchemaData(RDBMSSchemaHandler.java:207)
              at org.datanucleus.store.rdbms.RDBMSStoreManager.getColumnInfoForTable(RDBMSStoreManager.java:1699)
              at org.datanucleus.store.rdbms.table.TableImpl.validateColumns(TableImpl.java:218)
              at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.performTablesValidation(RDBMSStoreManager.java:2702)
              at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.addClassTablesAndValidate(RDBMSStoreManager.java:2503)
              at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:2148)
              at org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:113)
              at org.datanucleus.store.rdbms.RDBMSStoreManager.addClasses(RDBMSStoreManager.java:986)
              at org.datanucleus.store.rdbms.RDBMSStoreManager.addClasses(RDBMSStoreManager.java:952)
              at org.datanucleus.store.AbstractStoreManager.addClass(AbstractStoreManager.java:919)
              at org.datanucleus.store.mapped.MappedStoreManager.getDatastoreClass(MappedStoreManager.java:356)
              at org.datanucleus.store.rdbms.query.legacy.ExtentHelper.getExtent(ExtentHelper.java:48)
              at org.datanucleus.store.rdbms.RDBMSStoreManager.getExtent(RDBMSStoreManager.java:1332)
              at org.datanucleus.ObjectManagerImpl.getExtent(ObjectManagerImpl.java:4149)
              at org.datanucleus.store.rdbms.query.legacy.JDOQLQueryCompiler.compileCandidates(JDOQLQueryCompiler.java:411)
              at org.datanucleus.store.rdbms.query.legacy.QueryCompiler.executionCompile(QueryCompiler.java:312)
              at org.datanucleus.store.rdbms.query.legacy.JDOQLQueryCompiler.compile(JDOQLQueryCompiler.java:225)
              at org.datanucleus.store.rdbms.query.legacy.JDOQLQuery.compileInternal(JDOQLQuery.java:175)
      

        Activity

        Hide
        Carl Steinbach added a comment -

        Ed reported encountering this problem in an email to hive-user list:

        http://mail-archives.apache.org/mod_mbox/hive-user/201107.mbox/%3C4F6B25AFFFCAFE44B6259A412D5F9B1033183876@ExchMBX104.netflix.com%3E

        He noted that in some cases it's possible to prevent this error by setting datanucleus.fixedDataStore=true.

        Show
        Carl Steinbach added a comment - Ed reported encountering this problem in an email to hive-user list: http://mail-archives.apache.org/mod_mbox/hive-user/201107.mbox/%3C4F6B25AFFFCAFE44B6259A412D5F9B1033183876@ExchMBX104.netflix.com%3E He noted that in some cases it's possible to prevent this error by setting datanucleus.fixedDataStore=true.

          People

          • Assignee:
            Unassigned
            Reporter:
            Lenni Kuff
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Development