public class HiveJdbcClient extends Object
| Constructor and Description |
|---|
HiveJdbcClient() |
| Modifier and Type | Method and Description |
|---|---|
Connection |
connect(Config.HiveConnection connection) |
Connection |
connect(String ip,
String port,
String domain,
String user,
String password) |
void |
count(Statement stmt,
String tableName) |
void |
createTable(Statement stmt,
String tableName,
String schema) |
void |
describe(Statement stmt,
String tableName) |
void |
dropTable(Statement stmt,
String tableName) |
void |
exec(Statement stmt,
String command) |
void |
exec(Statement stmt,
String command,
boolean print) |
void |
insertInto(Statement stmt,
String tableName,
int key,
String value) |
void |
loadData(Statement stmt,
String tableName,
String localInpath) |
static void |
main(String[] args)
https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients
http:
//chase-seibert.github.io/blog/2013/05/17/hive-insert-and-dump-csv-with
-map-datatype.html
|
ResultSet |
selectAll(Statement stmt,
String tableName) |
ResultSet |
selectAll(Statement stmt,
String tableName,
boolean print) |
void |
showTables(Statement stmt) |
public static void main(String[] args) throws SQLException
SQLExceptionpublic Connection connect(Config.HiveConnection connection) throws SQLException
SQLExceptionpublic Connection connect(String ip, String port, String domain, String user, String password) throws SQLException
SQLExceptionpublic void insertInto(Statement stmt, String tableName, int key, String value) throws SQLException
SQLExceptionpublic void count(Statement stmt, String tableName) throws SQLException
SQLExceptionpublic ResultSet selectAll(Statement stmt, String tableName) throws SQLException
SQLExceptionpublic ResultSet selectAll(Statement stmt, String tableName, boolean print) throws SQLException
SQLExceptionpublic void loadData(Statement stmt, String tableName, String localInpath) throws SQLException
SQLExceptionpublic void describe(Statement stmt, String tableName) throws SQLException
SQLExceptionpublic void showTables(Statement stmt) throws SQLException
SQLExceptionpublic void dropTable(Statement stmt, String tableName) throws SQLException
SQLExceptionpublic void createTable(Statement stmt, String tableName, String schema) throws SQLException
SQLExceptionpublic void exec(Statement stmt, String command) throws SQLException
SQLExceptionpublic void exec(Statement stmt, String command, boolean print) throws SQLException
SQLExceptionCopyright © 2016. All rights reserved.