Oraoop disabled for Sqoop import

試著忘記壹切 提交于 2019-12-13 07:42:24

问题


I'm using the Hortonworks HDP Sandbox, and I’ve installed Oraoop per the instructions, but whenever I run a Sqoop import I get the message “oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled.”. I’m not sure what else I need to do for it to pick it up. I have verified that the oraoop driver is in my sqoop lib directory. The imports do work, but they are just using the oracle driver, and I would like to play around with some of the features that you get with Oraoop.

This is the command I'm running:

sqoop-import --connect jdbc:oracle:thin:@<ip>:1521/sid --username myUser -P --query "select * from mytable where \$CONDITIONS" -split-by sequence_id -as-sequencefile --target-dir /user/hue/data/deactivatedsponsor

回答1:


If '--query' argument is specified in place of '--table' parm, Oraoop connector is not used. Following is mentioned in Sqoop Documentation

Data Connector for Oracle and Hadoop accepts responsibility for those Sqoop Jobs with the following attributes:

Oracle-related

Table-Based - Jobs where the table argument is used and the specified object is a table.

Following command should use Oraoop Connector. I have included "--direct" option as well which indicates to Sqoop that Oraoop should be used.

sqoop-import --connect jdbc:oracle:thin:@<ip>:1521/sid --direct --username myUser -P --table mytable -split-by sequence_id -as-sequencefile --target-dir /user/hue/data/deactivatedsponsor --columns <columns list> --where <where condition if needed>



回答2:


Oraoop connector cannot process --query tool, when you use --query it automatically invokes sqoop. So instead of using --query use --table for import. Hope this helps!!



来源:https://stackoverflow.com/questions/31589994/oraoop-disabled-for-sqoop-import

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!