--connection-manager在Sqoop中的意义 [英] Significance of --connection-manager in Sqoop
问题描述
我已经编写了sqoop脚本,以将数据从Teradata导入到Hive.
I have written sqoop script to import data from Teradata to Hive.
`sqoop import \
--connect $JDBC_URL \
--driver com.teradata.jdbc.TeraDriver \
--username $Username \
--password $Password \
--table $TD_Table \
--hive-import \
--hive-overwrite \
--hive-drop-import-delims \
--hive-table $Hive_Database.$Hive_Staging_Table \
--split-by $Split_Col \
-m $Mapper_Number`
上面的脚本给出警告为
--connection-manager). Sqoop is going to fall back to org.apache.sqoop.manager.GenericJdbcManager.
但是当我在上述脚本中使用-connection-manager 时,我的-hive-drop-import-delims 和-hive-overwrite 停止工作
But when i used --connection-manager with above script my --hive-drop-import-delims and --hive-overwrite stoped working
我正在尝试理解连接管理器参数的意义是什么,如果我忽略它会如何影响我的导入
I'm trying to undersdtand what is the significance of connection-manager parameter how will it effect my imports if I'm ommiting it
请提出建议
推荐答案
您不需要使用上面的--driver
.另外,请确保已在/etc/sqoop/conf/managers.d
中设置了连接管理器.以下是使其正常运行的步骤:
You don't need to use --driver
above. Also, make sure you have the connection manager set in /etc/sqoop/conf/managers.d
. Here are the steps to get it working:
-
cd /etc/sqoop/conf
-
mkdir managers.d && cd managers.d
-
echo '<manager factory class> = <manager factory jar>' > td_connector.txt
cd /etc/sqoop/conf
mkdir managers.d && cd managers.d
echo '<manager factory class> = <manager factory jar>' > td_connector.txt
Manager工厂jar应该放在/var/lib/sqoop
中,并且可以从
Manager factory jar should be put in /var/lib/sqoop
and one can be downloaded from Cloudera.
这篇关于--connection-manager在Sqoop中的意义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!