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

beeline always have a warning "Hive does not support autoCommit=false"

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0
    • Component/s: Beeline
    • Labels:
      None
    • Environment:

      hive2.1.0

    • Target Version/s:
    • Release Note:
      set the autoCommit default value to true in BeeLineOpts

      Description

      When we use beeline, there is always a warning::"Request to set autoCommit to false; Hive does not support autoCommit=false",
      For example, we use beeline excute a sql:
      beeline -u "jdbc:hive2://localhost:10000/default" -n mr -e "show tables" --hivevar taskNO=10111, we got this warning:
      .................................................................................
      Connecting to jdbc:hive2://localhost:10000/default
      Connected to: Apache Hive (version 2.1.0-zdh2.7.3)
      Driver: Hive JDBC (version 2.1.0-zdh2.7.3)
      17/02/10 15:10:10 [main]: WARN jdbc.HiveConnection: Request to set autoCommit to false; Hive does not support autoCommit=false.

      When I looked at the hive source code, I found the BeeLineOpts set the autoCommit default value to false, It always triggers an alarm when beeline connect to the hiveserver2 in DatabaseConnection.connect:
      getConnection().setAutoCommit(beeLine.getOpts().getAutoCommit());

        Attachments

        1. HIVE-15862.1.patch
          0.6 kB
          yangfang

          Issue Links

            Activity

              People

              • Assignee:
                yangfang yangfang
                Reporter:
                yangfang yangfang
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: