10:50:13.115 [main] ERROR org.apache.hive.jdbc.HiveConnection - Error opening session
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})
	at org.apache.thrift.TApplicationException.read(TApplicationException.java:111) ~[libthrift-0.9.3.jar:0.9.3]
	at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:79) ~[libthrift-0.9.3.jar:0.9.3]
	at org.apache.hive.service.rpc.thrift.TCLIService$Client.recv_OpenSession(TCLIService.java:168) ~[hive-service-rpc-2.3.4.jar:2.3.4]
	at org.apache.hive.service.rpc.thrift.TCLIService$Client.OpenSession(TCLIService.java:155) ~[hive-service-rpc-2.3.4.jar:2.3.4]
	at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:680) [hive-jdbc-2.3.4.jar:2.3.4]
	at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:200) [hive-jdbc-2.3.4.jar:2.3.4]
	at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) [hive-jdbc-2.3.4.jar:2.3.4]
	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1644) [druid-1.1.21.jar:1.1.21]
	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1710) [druid-1.1.21.jar:1.1.21]
	at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:939) [druid-1.1.21.jar:1.1.21]
	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1376) [druid-1.1.21.jar:1.1.21]
	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1372) [druid-1.1.21.jar:1.1.21]
	at DataBaseUtil.getConnection(DataBaseUtil.java:280) [classes/:?]
	at HiveJdbcUtil.selectDataToJson(HiveJdbcUtil.java:48) [classes/:?]
	at HiveJdbcUtil.main(HiveJdbcUtil.java:142) [classes/:?]

解决办法
经过排查是hive依赖版本的问题
因为我集群中hive版本是1.1.0
而代码依赖中hive-jdbc依赖用的2.3.4版本
将代码中依赖版本与集群保持一致即可