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

Beeline add commands to register local jdbc driver names and jars

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0
    • None
    • Hide
      Add one new command for beeline: addlocaljar. With this command, users are able to add local jdbc driver jar file in the beeline side.

      There are two kinds of use cases. One is to add an existing known driver like mysql driver or postgres driver. Current supported driver are postgres and mysql.
      {noformat}
      # beeline
      beeline> !addlocaldriverjar /path/to/mysql-connector-java-5.1.27-bin.jar
      beeline> !connect mysql://host:3306/testdb
      {noformat}
      And another is to add a customized driver.
      {noformat}
      # beeline
      beeline>!addlocaldriverjar /path/to/DummyDriver-1.0-SNAPSHOT.jar
      beeline>!addlocaldrivername org.apache.dummy.DummyDrive
      beeline> !connect mysql://host:3306/testdb
      {noformat}
      Show
      Add one new command for beeline: addlocaljar. With this command, users are able to add local jdbc driver jar file in the beeline side. There are two kinds of use cases. One is to add an existing known driver like mysql driver or postgres driver. Current supported driver are postgres and mysql. {noformat} # beeline beeline> !addlocaldriverjar /path/to/mysql-connector-java-5.1.27-bin.jar beeline> !connect mysql://host:3306/testdb {noformat} And another is to add a customized driver. {noformat} # beeline beeline>!addlocaldriverjar /path/to/DummyDriver-1.0-SNAPSHOT.jar beeline>!addlocaldrivername org.apache.dummy.DummyDrive beeline> !connect mysql://host:3306/testdb {noformat}

    Description

      At present if a beeline user uses add jar the path they give is actually on the HS2 server. It'd be great to allow beeline users to add local jdbc driver jars and register custom jdbc driver names.

      Attachments

        1. DummyDriver-1.0-SNAPSHOT.jar
          3 kB
          Ferdinand Xu
        2. HIVE-9302.1.patch
          22 kB
          Ferdinand Xu
        3. HIVE-9302.2.patch
          22 kB
          Ferdinand Xu
        4. HIVE-9302.3.patch
          21 kB
          Xuefu Zhang
        5. HIVE-9302.3.patch
          21 kB
          Ferdinand Xu
        6. HIVE-9302.4.patch
          22 kB
          Ferdinand Xu
        7. HIVE-9302.patch
          17 kB
          Ferdinand Xu
        8. mysql-connector-java-bin.jar
          852 kB
          Ferdinand Xu
        9. postgresql-9.3.jdbc3.jar
          526 kB
          Ferdinand Xu

        Issue Links

          Activity

            People

              Ferd Ferdinand Xu
              brocknoland Brock Noland
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: