2

我正在尝试将一个简单的表从 SQL Server 2008 R2 数据库导入配置单元。

Hadoop version - CDH3U3
Sqoop version - 1.3.0-cdh3u3
$SQOOP_HOME/lib - sqljdbc4.jar
$SQOOP_HOME/lib - sqoop-sqlserver-1.0.jar
$SQOOP_CONF_DIR/managers.d/mssqoop-sqlserver

Windows firewall - disabled
Linux IPTables - disabled

我的导入命令是 -

sqoop import --connect 'jdbc:sqlserver://172.16.1.47;username=sa;password=asdf1234;database=test' --table bruce --hive-import --verbose

我没有看到任何错误消息,但它只是永远挂起。如果我查看 SQL Server 活动监视器,我可以看到正在创建一个进程。

这是 sqoop 输出 -

[root@sc-qa-test-01 bruce]# ./sqoop_test_sqlserver.sh<br>
Warning: /usr/lib/hbase does not exist! HBase imports will fail.<br>
Please set $HBASE_HOME to the root of your HBase installation.<br>
12/09/27 15:37:58 DEBUG tool.BaseSqoopTool: Enabled debug logging.<br>
12/09/27 15:37:58 INFO tool.BaseSqoopTool: Using Hive-specific delimiters for output. You can override<br>
12/09/27 15:37:58 INFO tool.BaseSqoopTool: delimiters with --fields-terminated-by, etc.<br>
12/09/27 15:37:58 DEBUG sqoop.ConnFactory: Added factory com.microsoft.sqoop.SqlServer.MSSQLServerManagerFactory specified by /usr/lib/sqoop/conf/managers.d/mssqoop-sqlserver<br>
12/09/27 15:37:58 DEBUG sqoop.ConnFactory: Loaded manager factory: com.microsoft.sqoop.SqlServer.MSSQLServerManagerFactory<br>
12/09/27 15:37:58 DEBUG sqoop.ConnFactory: Loaded manager factory: com.cloudera.sqoop.manager.DefaultManagerFactory<br>
12/09/27 15:37:58 DEBUG sqoop.ConnFactory: Trying ManagerFactory: com.microsoft.sqoop.SqlServer.MSSQLServerManagerFactory<br>
12/09/27 15:37:58 INFO SqlServer.MSSQLServerManagerFactory: Using Microsoft's SQL Server - Hadoop Connector<br>
12/09/27 15:37:58 INFO manager.SqlManager: Using default fetchSize of 1000<br>
12/09/27 15:37:58 DEBUG sqoop.ConnFactory: Instantiated ConnManager com.microsoft.sqoop.SqlServer.MSSQLServerManager@15aaf0b3<br>
12/09/27 15:37:58 INFO tool.CodeGenTool: Beginning code generation<br>
12/09/27 15:37:58 DEBUG manager.SqlManager: No connection paramenters specified. Using regular API for making connection.<br><br>

任何建议将不胜感激。

4

2 回答 2

0

您似乎正在使用 Microsoft SQL Connector for Sqoop。作为第一步,我建议将其关闭,看看是否有帮助。

于 2012-11-14T22:43:56.410 回答
0

使用以下命令

sqoop import --connect 'jdbc:sqlserver://172.16.1.47:<port_number>/test --table bruce --username sa --password asdf1234 --hive-import --hive-table <table_in_hive> --verbose

其中 table_in_hive 是动态创建的

于 2014-05-06T13:14:22.260 回答