Here you can find the source of getHiveConnection()
public static Connection getHiveConnection() throws Exception
//package com.java2s; //License from project: Apache License import java.sql.Connection; import java.sql.DriverManager; public class Main { public static Connection getHiveConnection() throws Exception { Class.forName("org.apache.hadoop.hive.jdbc.HiveDriver"); return DriverManager.getConnection( "jdbc:hive://hadoop:10000/default", "", ""); }/*w ww. j a va 2s.c o m*/ }