Connect Hive through Java JDBC

后端 未结 6 654
北海茫月
北海茫月 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条回答
  •  太阳男子
    2021-02-06 03:25

    I have faced the same issue with CDH5.4.1 version. I updated my POM file with the below code and it worked for me.

    My Hadoop Version is Hadoop 2.6.0-cdh5.4.1 and Hive version is Hive 1.1.0-cdh5.4.1

    
            org.apache.hive
            hive-exec
            0.13.0
        
        
            org.apache.hive
            hive-jdbc
            0.13.0
        
        
            org.apache.thrift
            libthrift
            0.9.0
        
        
            org.apache.thrift
            libfb303
            0.9.0
        
        
            commons-logging
            commons-logging
            1.1.3
        
        
            org.apache.hadoop
            hadoop-client
            2.6.0
        
    

    I have resolved with this POM update.

提交回复
热议问题