gpt4 book ai didi

oracle - sqoop-连接到oracle并将数据导入IBM BigInsights中的HDFS

转载 作者:行者123 更新时间:2023-12-02 22:04:04 25 4
gpt4 key购买 nike

我想连接到我的数据库(oracle 10g)并将数据导入HDFS
我正在使用IBM big Insight Platform。

但是当我使用以下命令时:

sqoop import --connect jdbc:oracle:thin://<IP>:1521/DB--username xxx --password xxx--table t /lib/sqoop/sqoopout 

运行Sqoop时出现异常:

java.lang.RuntimeException: Could not load db driver class: oracle.jdbc.OracleDriver

java.lang.RuntimeException: Could not load db driver class: oracle.jdbc.OracleDriver

at org.apache.sqoop.manager.OracleManager.makeConnection(OracleManager.java:286) at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)

at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:752) at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:775) at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(SqlManager.java:270) at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:241) at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:227) at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:295) at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1833) at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1645) at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107) at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478) at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605) 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)



我还将sqoop / lib中的 ojdbc6_g.jar 复制。
请帮助我解决我可以将数据导入HDFS的问题。

最佳答案

您正在使用哪个版本的BigInsights?您是否已在所有节点中加载了Oracle odbc jar? Sqoop在内部触发将从数据节点运行的Map作业。

关于oracle - sqoop-连接到oracle并将数据导入IBM BigInsights中的HDFS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36716127/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com