环境: 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 //开启定时任务
@SpringBootApplica