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

Hive SchemaTool does not tolerate leading spaces in JDBC url

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 2.0.0
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      Description

      With configuration as below:
      <property>
      <name>
      javax.jdo.option.ConnectionURL
      </name>
      <value>
      jdbc:mysql://host/hive?createDatabaseIfNotExist=true
      </value>
      </property>

      SchemaTool will failed:
      export HIVE_CONF_DIR=$HIVE_CONF_DIR; schematool -dbType mysql -userName hive -passWord xxx -initSchema -verbose
      exception as below:
      Metastore connection URL:
      jdbc:mysql://host/hive?createDatabaseIfNotExist=true

      Metastore Connection Driver : com.mysql.jdbc.Driver
      Metastore connection User: hive
      org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
      org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
      at org.apache.hive.beeline.HiveSchemaHelper.getConnectionToMetastore(HiveSchemaHelper.java:77)
      at org.apache.hive.beeline.HiveSchemaTool.getConnectionToMetastore(HiveSchemaTool.java:113)
      at org.apache.hive.beeline.HiveSchemaTool.testConnectionToMetastore(HiveSchemaTool.java:159)
      at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:257)
      at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:243)
      at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:473)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
      Caused by: java.sql.SQLException: No suitable driver found for
      jdbc:mysql://host/hive?createDatabaseIfNotExist=true

      at java.sql.DriverManager.getConnection(DriverManager.java:689)
      at java.sql.DriverManager.getConnection(DriverManager.java:247)
      at org.apache.hive.beeline.HiveSchemaHelper.getConnectionToMetastore(HiveSchemaHelper.java:73)
      ... 11 more

        Attachments

        1. HIVE-12263.1.patch
          0.6 kB
          Chen Xin Yu

        Issue Links

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment