环境: hive驱动版本:1.2.1
通过以下连接方式,通过hiveserver2 url jdbc:hive2://xxx.com:10000/;principal=hive/xxx.com@XX.COM 连接hiveserver2完全正确,但是换成zookeeper url就报错:
package com.asiainfo;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.security.UserGroupInformation;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
/*
* 开启定时任务
*/
@EnableScheduling //开启定时任务
@SpringBootApplication(scanBasePackages = {"com.toroidals.*
在使用版本为1.2.1的Hive驱动尝试通过Zookeeper连接到Hiveserver2时遇到错误。错误表明由于驱动版本过低导致无法从Zookeeper读取HiveServer2信息。升级Hive驱动到2.0.0版本后,连接问题得到解决。
订阅专栏 解锁全文
1587

被折叠的 条评论
为什么被折叠?



