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
SQLException
public Connection connect(Config.HiveConnection connection) throws SQLException
SQLException
public Connection connect(String ip, String port, String domain, String user, String password) throws SQLException
SQLException
public void insertInto(Statement stmt, String tableName, int key, String value) throws SQLException
SQLException
public void count(Statement stmt, String tableName) throws SQLException
SQLException
public ResultSet selectAll(Statement stmt, String tableName) throws SQLException
SQLException
public ResultSet selectAll(Statement stmt, String tableName, boolean print) throws SQLException
SQLException
public void loadData(Statement stmt, String tableName, String localInpath) throws SQLException
SQLException
public void describe(Statement stmt, String tableName) throws SQLException
SQLException
public void showTables(Statement stmt) throws SQLException
SQLException
public void dropTable(Statement stmt, String tableName) throws SQLException
SQLException
public void createTable(Statement stmt, String tableName, String schema) throws SQLException
SQLException
public void exec(Statement stmt, String command) throws SQLException
SQLException
public void exec(Statement stmt, String command, boolean print) throws SQLException
SQLException
Copyright © 2016. All rights reserved.