List of utility methods to do JDBC Hadoop Connection
Connection | getConnection() get Connection try { Connection conn = DriverManager.getConnection("jdbc:hive://master.hadoop:10000/myhive", "", ""); return conn; } catch (SQLException e) { e.printStackTrace(); return null; |
Connection | getHiveConnection() get Hive Connection Class.forName("org.apache.hadoop.hive.jdbc.HiveDriver"); return DriverManager.getConnection("jdbc:hive://hadoop:10000/default", "", ""); |