How to run a Sqoop Import from a Hive Thrift Client to a Hive Thrift Server?

柔情痞子 提交于 2019-12-07 22:42:53

问题


Using JDBC I easily connected and able to Run Hive-QL query with the following sample code:-

Connection con = DriverManager.getConnection("jdbc:hive2://192.168.56.102:10000/default", "", "");
Statement stmt = con.createStatement();
String tableName = "testHiveDriverTable1";
stmt.executeQuery("create table " + tableName + " (key int, value string)");

This means I am able to communicate with Hive. Now I want to execute sqoop also. How can I do it? I did it through command line, see following sample import which worked

sqoop import --connect jdbc:mysql://192.168.56.101:3316/dw_db --username=user --password=pwd --table active_list --hive-import -m 1 -- --schema default

how this can be achive. And to make sure is that server running at 10000 port is Hive thrift Server? If yes so how can I make it to execute my sqoop query over Hive?

来源:https://stackoverflow.com/questions/24400513/how-to-run-a-sqoop-import-from-a-hive-thrift-client-to-a-hive-thrift-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!