如何从Hive Thrift客户端运行Sqoop导入到Hive Thrift服务器?
使用JDBC我可以轻松连接并能够使用以下示例代码运行Hive-QL查询: –
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)");
这意味着我能够与Hive进行通信。 现在我也想执行sqoop。 我该怎么做? 我是通过命令行完成的,请参阅以下示例导入
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
这怎么可能成为现实。 并确保运行在10000端口的服务器是Hive thrift Server? 如果是,那么如何让它在Hive上执行我的sqoop查询呢?
- 使用Hive JDBC执行程序时出错
- 必需字段’client_protocol’未设置
- 使用Java API从Hive获取表属性
- 如何在Java中对Hive进行异步调用?
- PIG – 找到接口org.apache.hadoop.mapreduce.JobContext,但是类是预期的
- Apache Hive JDBC驱动程序在哪里下载?
- java中的java.sql.SQLException:org.apache.thrift.transport.TTransportException?
- 无法通过JAVA连接到HIVE2
- 无法validationserde:org.openx.data.jsonserde.jsonserde