Java连接TBDS-5.2.0.1平台的hive无法连接问题(1)

java直接使用

implementation (group: 'org.apache.hive', name: 'hive-jdbc', version: '2.3.9')

连接hive报以下错误

java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://10.72.50.12:10000: Failed to open new session: java.lang.IllegalArgumentExc
eption: Cannot modify hive.server2.thrift.resultset.default.fetch.size at runtime. It is not in list of params that are allowed to be modified at runtime

通过find / -name "hive"搜索jar所在位置
引入以下jar包,问题解决

    implementation files('lib/hive-jdbc-2.2.0-TBDS-5.2.0.1.jar')
    implementation files('lib/hive-service-rpc-2.2.0-TBDS-5.2.0.1.jar')
    implementation files('lib/libthrift-0.9.3.jar')
    implementation files('lib/hive-service-2.2.0-TBDS-5.2.0.1.jar')
    implementation files('lib/hive-common-2.2.0-TBDS-5.2.0.1.jar')
    implementation files('lib/hive-serde-2.2.0-TBDS-5.2.0.1.jar')

你可能感兴趣的:(Java连接TBDS-5.2.0.1平台的hive无法连接问题(1))