Connect Hive through Java JDBC

后端 未结 6 664
北海茫月
北海茫月 2021-02-06 02:29

There is a question here connect from java to Hive but mine is different

My hive running on machine1 and I need to pass some queries using Java server

6条回答
  •  猫巷女王i
    2021-02-06 03:24

    In case if you didn't still solve this, I have given it a go. And I needed the following dependencies for it to compile and run :

    libthrift-0.9.0-cdh5-2.jar
    httpclient-4.2.5.jar
    httpcore-4.2.5.jar
    commons-logging-1.1.3.jar
    hive-common.jar
    slf4j-api-1.7.5.jar
    hive-metastore.jar
    hive-service.jar
    hadoop-common.jar
    hive-jdbc.jar
    guava-11.0.2.jar
    

    The hive documentation is probably written against a older version/distribution.

    Your exception is due to the missing hadoop-common jar, which has the org.apache.hadoop.conf.Configuration.

    Hope this helps.

提交回复
热议问题