报错信息:
[ 08S01] Could not open client transport with JDBC Uri: jdbc:hive2://192.168.88.80:10000: Could not establish connection to jdbc:hive2://192.168.88.80:10000: Required field ‘client_protocol’ is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{set:hiveconf:hive.server2.thrift.resultset.default.fetch.size=1000, use:database=default}) org.apache.hive.org.apache.thrift.TApplicationException: Required field ‘client_protocol’ is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{set:hiveconf:hive.server2.thrift.resultset.default.fetch.size=1000, use:database=default}).
版本问题:
10002端口查看服务端hiveserver2版本为2.1.1
datagrip里面查看客户端所依赖的驱动版本3.1.2:
把3.1.2版本的jar包移除,下面的jar包放到对应的目录下,加载上去即可
3以上Hive版本只需要依赖一个jar包,2版本的Hive依赖多个jar包。
客户端Hive版本需要和服务端Hive版本保持一致