一:首先引入所需要的JAR包
<hive-jdbc.version>0.11.0</hive-jdbc.version>
<hadoop-common.version>2.2.0</hadoop-common.version>
<hadoop-common.version>2.2.0</hadoop-common.version>
<!-- Hive -->
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>${hive-jdbc.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop-common.version}</version>
</dependency>
二:程序访问:
public class HiveJDBCUtil {
private static String driverName = "org.apache.hive.jdbc.HiveDriver";
private static String url = "jdbc:hive2://ip地址:10000/tandem;?mapreduce.job.queuename=default";
priv