前言
链接hive报错大多数都是hive的jdbc驱动版本有问题跟链接的hive版本不一样
一、使用步骤
在hadoop集群,hive 找到jar包路径
退出hive : quit; 进入路径
使用工具导出jar包
报错示例
[ 08S01] Could not open client transport with JDBC Uri: jdbc:hive2://192.168.4.11:10000/dwd: Could not establish connection to jdbc:hive2://192.168.4.11:10000/dwd: Required field 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{set:hiveconf:hive.server2.thrift.resultset.default.fetch.size=1000, use:database=dwd})
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=dwd}).