通过 Hortonworks Sandbox 上的 sqoop 连接到 Oracle

Connect to Oracle via sqoop on Hortonworks Sandbox

我目前正在使用 Hortonworks Sandbox(在他们的网站上下载),我想 运行 sqoop 连接到我的 Oracle 数据库并检索信息。

我已经完成的步骤:

我收到以下消息:

15/06/16 04:25:01 INFO sqoop.Sqoop: Running Sqoop version: 1.4.5.2.2.4.2-2
15/06/16 04:25:01 WARN sqoop.ConnFactory: Parameter --driver is set to an explicit driver however appropriate connection manager is not being set (via --connection-manager). Sqoop is going to fall back to org.apache.sqoop.manager.GenericJdbcManager. Please specify explicitly which connection manager should be used next time.
15/06/16 04:25:01 INFO manager.SqlManager: Using default fetchSize of 1000
15/06/16 04:25:01 INFO tool.CodeGenTool: Beginning code generation
15/06/16 04:25:01 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: Could not load db driver class: oracle.jdbc.driver.oracledriver
java.lang.RuntimeException: Could not load db driver class: oracle.jdbc.driver.oracledriver
        at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:848)
        at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)
        at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:736)
        at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:759)
        at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(SqlManager.java:269)
        at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:240)
        at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:226)
        at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:295)
        at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1773)
        at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1578)
        at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:96)
        at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)
        at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:601)
        at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
        at org.apache.sqoop.Sqoop.main(Sqoop.java:236)

从那里开始,我只是不知道下一步该做什么。 如果你能给我一些我可以检查的信息,那就太好了。

请检查 oracle 驱动程序是否可用:SQOOP_HOME/lib

您的答案可以在这里找到:

https://hortonworks.com/community/forums/topic/unable-to-sqoop-data-from-hdfs-to-oracle/

https://mail-archives.apache.org/mod_mbox/sqoop-user/201306.mbox/%3CCANhcbvMsjxqeUefuZUe0s-Z=J2Eo9pp2wo-mRXjfBQk60+asoQ@mail.gmail.com%3E