首先启动hiveserver2服务,metastore服务,这两个服务肯定要起
然后报错
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}).
意识到可能是版本较高的原因,看了自己hive是2.1.1版本,然后去仓库找了个2.1版本的jar包但是还是报错
未找到驱动程序类 ‘org.apache.hive.service.rpc.thrift.TCLIService$Iface’.
最后网上找了各种办法都不行,最后想起来了dbeaver的驱动也许可以,随便拿个了dbeaver的hive驱动搞定了
驱动名字有些奇怪不过确实可以用
测试一下
成功
2个积分下载的地址
https://download.youkuaiyun.com/download/zs1238520/85612043