Java JDBC Hadoop Connection getHiveConnection()

Here you can find the source of getHiveConnection()

Description

get Hive Connection

License

Apache License

Declaration

public static Connection getHiveConnection() throws Exception 

Method Source Code

//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*/
}

Related

  1. getConnection()