禁用Oraoop进行Sqoop导入 [英] Oraoop disabled for Sqoop import

查看:331
本文介绍了禁用Oraoop进行Sqoop导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Hortonworks HDP沙箱,并且已按照说明安装了Oraoop,但是每当运行Sqoop导入时,都会收到消息"oracle.OraOopManagerFactory:Oracle和Hadoop的数据连接器已禁用.".我不确定要拿起它还需要做什么.我已验证oraoop驱动程序在我的sqoop lib目录中.导入确实可以,但是它们只是使用oracle驱动程序,我想体验一下Oraoop所提供的一些功能.

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

推荐答案

如果在'--table'参数中指定了'--query'参数,则不使用Oraoop连接器. Sqoop文档

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

用于Oracle和Hadoop的数据连接器对具有以下属性的那些Sqoop作业承担责任:

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

与Oracle有关

基于表格-使用table参数且指定对象是表格的作业.

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

以下命令应使用Oraoop连接器.我已将"--direct"包括在内选项也向Sqoop指示应使用Oraoop.

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>

这篇关于禁用Oraoop进行Sqoop导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆