我正在使用Hortonworks Sandbox 2.2 VM,对oracle运行Sqoop时遇到问题。我正在执行以下命令:
sqoop list-tables --connect jdbc:oracle:thin:@mydbhost.com:1521/sid --username user --password password
它执行了,但是什么也没发生:
Warning: /usr/hdp/2.2.4.2-2/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
15/05/29 15:55:58 INFO sqoop.Sqoop: Running Sqoop version: 1.4.5.2.2.4.2-2
15/05/29 15:55:58 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
15/05/29 15:55:58 INFO oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled.
15/05/29 15:55:58 INFO manager.SqlManager: Using default fetchSize of 1000
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.2.4.2-2/hadoop/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.2.4.2-2/zookeeper/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.2.4.2-2/hive/lib/hive-jdbc-0.14.0.2.2.4.2-2-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
15/05/29 15:55:59 INFO manager.OracleManager: Time zone has been set to GMT
如果我将--driver oracle.jdbc.OracleDriver指定为参数,则list-tables命令可以正常工作,但是导入失败,并显示错误“ORA-00933:SQL命令未正确结束”。我在几个地方读到,指定--driver参数不是正确的处理方法,但是当我不指定它时,我什么也无法工作。
我在这里做错了什么?
最佳答案
请尝试以下步骤
1.将ojdbc6.jar放在$ SQOOP_HOME / lib中
2.删除了--driver选项
3.引用所有参数
关于hadoop - Sqoop列表表问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30534146/