Hive
  1. Hive
  2. HIVE-4373

Hive Version returned by HiveDatabaseMetaData.getDatabaseProductVersion is incorrect

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.11.0
    • Fix Version/s: 0.11.0
    • Component/s: HiveServer2
    • Labels:
      None

      Description

      When running beeline

      % beeline -u 'jdbc:hive2://localhost:10000' -n hive -p passwd -d org.apache.hive.jdbc.HiveDriver
      Connecting to jdbc:hive2://localhost:10000
      Connected to: Hive (version 0.10.0)
      Driver: Hive (version 0.11.0)
      Transaction isolation: TRANSACTION_REPEATABLE_READ
      

      The Hive version in the "Connected to: " string says 0.10.0 instead of 0.11.0.

      Looking at the code it seems that the version is hardcoded at two places:
      line 250 in jdbc/src/java/org/apache/hive/jdbc/HiveDatabaseMetaData.java
      line 833 in jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java

      1. HIVE-4373.3.patch
        5 kB
        Thejas M Nair
      2. HIVE-4373.2.patch
        6 kB
        Thejas M Nair
      3. HIVE-4373.1.patch
        6 kB
        Thejas M Nair

        Issue Links

          Activity

          Hide
          Hudson added a comment -

          Integrated in Hive-trunk-hadoop2 #183 (See https://builds.apache.org/job/Hive-trunk-hadoop2/183/)
          HIVE-4373 : Hive Version returned by HiveDatabaseMetaData.getDatabaseProductVersion is incorrect (Thejas Nair via Ashutosh Chauhan) (Revision 1477249)

          Result = FAILURE
          hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1477249
          Files :

          • /hive/trunk/common/build.xml
          • /hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveDatabaseMetaData.java
          • /hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
          • /hive/trunk/service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java
          Show
          Hudson added a comment - Integrated in Hive-trunk-hadoop2 #183 (See https://builds.apache.org/job/Hive-trunk-hadoop2/183/ ) HIVE-4373 : Hive Version returned by HiveDatabaseMetaData.getDatabaseProductVersion is incorrect (Thejas Nair via Ashutosh Chauhan) (Revision 1477249) Result = FAILURE hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1477249 Files : /hive/trunk/common/build.xml /hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveDatabaseMetaData.java /hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java /hive/trunk/service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java
          Hide
          Hudson added a comment -

          Integrated in Hive-trunk-h0.21 #2086 (See https://builds.apache.org/job/Hive-trunk-h0.21/2086/)
          HIVE-4373 : Hive Version returned by HiveDatabaseMetaData.getDatabaseProductVersion is incorrect (Thejas Nair via Ashutosh Chauhan) (Revision 1477249)

          Result = FAILURE
          hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1477249
          Files :

          • /hive/trunk/common/build.xml
          • /hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveDatabaseMetaData.java
          • /hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
          • /hive/trunk/service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java
          Show
          Hudson added a comment - Integrated in Hive-trunk-h0.21 #2086 (See https://builds.apache.org/job/Hive-trunk-h0.21/2086/ ) HIVE-4373 : Hive Version returned by HiveDatabaseMetaData.getDatabaseProductVersion is incorrect (Thejas Nair via Ashutosh Chauhan) (Revision 1477249) Result = FAILURE hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1477249 Files : /hive/trunk/common/build.xml /hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveDatabaseMetaData.java /hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java /hive/trunk/service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java
          Hide
          Ashutosh Chauhan added a comment -

          Committed to trunk and 0.11 branch. Thanks, Thejas!

          Show
          Ashutosh Chauhan added a comment - Committed to trunk and 0.11 branch. Thanks, Thejas!
          Hide
          Ashutosh Chauhan added a comment -

          +1

          Show
          Ashutosh Chauhan added a comment - +1
          Hide
          Thejas M Nair added a comment -

          HIVE-4373.3.patch - patch without the package-info.java location change. Old location works as Carl mentioned. This addresses all comments from Carl Steinbach.

          Show
          Thejas M Nair added a comment - HIVE-4373 .3.patch - patch without the package-info.java location change. Old location works as Carl mentioned. This addresses all comments from Carl Steinbach .
          Hide
          Thejas M Nair added a comment -

          New patch addressing review comments from Carl Steinbach

          Show
          Thejas M Nair added a comment - New patch addressing review comments from Carl Steinbach
          Hide
          Carl Steinbach added a comment -

          I left some comments on reviewboard. Thanks.

          Show
          Carl Steinbach added a comment - I left some comments on reviewboard. Thanks.
          Hide
          Thejas M Nair added a comment -

          HIVE-4373.1.patch changes

          • HiveSessionImpl.getInfo populates the current version using HiveVersionInfo.getVersion()
          • Test case also checks for format of version.
          • saveVersion.sh produces the package-info.java in the right directory, ie directory with HiveVersionInfo.java, so that its package is annotated
          • changed build.xml to build package-info.java
          Show
          Thejas M Nair added a comment - HIVE-4373 .1.patch changes HiveSessionImpl.getInfo populates the current version using HiveVersionInfo.getVersion() Test case also checks for format of version. saveVersion.sh produces the package-info.java in the right directory, ie directory with HiveVersionInfo.java, so that its package is annotated changed build.xml to build package-info.java

            People

            • Assignee:
              Thejas M Nair
              Reporter:
              Deepesh Khandelwal
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development