Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-11939

TxnDbUtil should turn off jdbc auto commit

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0, 2.0.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      TxnDbUtil uses jdbc transactions, but doesn't turn off auto commit. So some TestStreaming tests are flaky. For example,

      testTransactionBatchAbortAndCommit(org.apache.hive.hcatalog.streaming.TestStreaming)  Time elapsed: 0.011 sec  <<< ERROR!
      java.sql.SQLException: Table/View 'TXNS' already exists in Schema 'APP'.
      	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
      	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.duplicateDescriptorException(Unknown Source)
      	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptor(Unknown Source)
      	at org.apache.derby.impl.sql.execute.CreateTableConstantAction.executeConstantAction(Unknown Source)
      	at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
      	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
      	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
      	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
      	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
      	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
      	at org.apache.hadoop.hive.metastore.txn.TxnDbUtil.prepDb(TxnDbUtil.java:72)
      	at org.apache.hadoop.hive.metastore.txn.TxnDbUtil.prepDb(TxnDbUtil.java:131)
      	at org.apache.hive.hcatalog.streaming.TestStreaming.<init>(TestStreaming.java:160)
      
      

        Attachments

          Activity

            People

            • Assignee:
              jxiang Jimmy Xiang
              Reporter:
              jxiang Jimmy Xiang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: