gpt4 book ai didi

java - 使用 Apache Sqoop 从 MySQL 导入数据 - 错误 : No manager for connect string

转载 作者:可可西里 更新时间:2023-11-01 16:23:49 25 4
gpt4 key购买 nike

我正在尝试将 Mahout 与外部数据源集成。我正在关注 Apache Mahout Cookbook为此预订。

我已经配置了 Hadoop 2.4、MySQL 服务器并且我已经将一个虚拟数据库导入到 mysql 中。

我还按照书中的步骤安装了 Apache Sqoop,并在 Sqoop 库 (sqoop/lib) 中下载并部署了 mysql-connector-java-5.1.30.jar

我用 ant 命令构建了 sqoop :

   ant mvn-install

构建顺利。

我正在尝试使用书中所述的以下命令从 mysql 导入数据:

   sqoop import-all-tables --connect jdbc:mysql/localohost/bbdatabank --username root -P --verbose

但它失败并出现以下错误:

Warning: /usr/lib/hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: /usr/lib/hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
14/05/05 14:19:29 DEBUG tool.BaseSqoopTool: Enabled debug logging.
Enter password:
14/05/05 14:19:30 DEBUG sqoop.ConnFactory: Loaded manager factory: com.cloudera.sqoop.manager.DefaultManagerFactory
14/05/05 14:19:30 DEBUG sqoop.ConnFactory: Trying ManagerFactory: com.cloudera.sqoop.manager.DefaultManagerFactory
14/05/05 14:19:30 DEBUG manager.DefaultManagerFactory: Trying with scheme: jdbc
14/05/05 14:19:30 ERROR tool.BaseSqoopTool: Got error creating database manager:
java.io.IOException: No manager for connect string: jdbc:mysql/localohost/bbdatabank
at org.apache.sqoop.ConnFactory.getManager(ConnFactory.java:185)
at org.apache.sqoop.tool.BaseSqoopTool.init(BaseSqoopTool.java:225)
at org.apache.sqoop.tool.ImportTool.init(ImportTool.java:84)
at org.apache.sqoop.tool.ImportAllTablesTool.run(ImportAllTablesTool.java:82)
at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
at org.apache.sqoop.Sqoop.main(Sqoop.java:238)

有人可以帮我找到我丢失的东西吗?为什么会产生此错误,我该如何解决?

PS:我没有安装 HBase 和 HCatalog,因为书上说我不需要它。

最佳答案

看起来你的jdbc url不正确,应该是这样的

jdbc:mysql://localhost/bbdatabank 

关于java - 使用 Apache Sqoop 从 MySQL 导入数据 - 错误 : No manager for connect string,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23472688/

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