简体   繁体   English

Sqoop 访问控制 mysql 问题

[英]Sqoop Access Control of mysql issue

In our network, we have very clear access control for mysql database.在我们的网络中,我们对 mysql 数据库有非常清晰的访问控制。 After writing a sqoop command we discovered that sqoop is trying to connect with mysql from one of the servers in hadoop cluster.在编写 sqoop 命令后,我们发现 sqoop 正在尝试从 hadoop 集群中的一台服务器连接 mysql。 Servers in hadoop cluster will not be able to connect to mysql database. hadoop 集群中的服务器将无法连接到 mysql 数据库。

Is there any way to tell sqoop to connect with our mysql from the local machine where we are executing our sqoop command?有什么方法可以告诉 sqoop 从我们执行 sqoop 命令的本地机器连接到我们的 mysql 吗?

Sqoop naturally runs as a map reduce job. Sqoop 自然地作为 map 减少作业运行。 Therefore the process which is copying the data from mysql, could run on any host on the cluster and often there will be several processes reading data from mysql concurrently.因此,从 mysql 复制数据的进程可以在集群上的任何主机上运行,并且通常会有多个进程同时从 mysql 读取数据。

However, I think you can run Sqoop in "local" mode to stop it running on map reduce by passing -jt local to the command, eg:但是,我认为您可以在“本地”模式下运行 Sqoop,以通过将-jt local传递给命令来停止它在 map reduce 上运行,例如:

sqoop [tool-name] -jt local [tool-arguments]

However if you need to run the exports in parallel, this may be much slower.但是,如果您需要并行运行导出,这可能会慢得多。

Note, I have not tested this myself.请注意,我自己没有对此进行测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM