【问题标题】:Not able to connect Mysql database to presto - No factory for connector mysql无法将 Mysql 数据库连接到 presto - 没有连接器 mysql 的工厂
【发布时间】:2015-08-20 09:26:12
【问题描述】:

尝试在 Intellij 中启动 Presto 服务器时,我总是收到此错误。
2015-06-05T19:30:32.293+0530 ERROR main com.facebook.presto.server.PrestoServer No factory for connector mysql

java.lang.IllegalArgumentException: No factory for connector mysql
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
at com.facebook.presto.connector.ConnectorManager.createConnection(ConnectorManager.java:131)
at com.facebook.presto.metadata.CatalogManager.loadCatalog(CatalogManager.java:88)
at com.facebook.presto.metadata.CatalogManager.loadCatalogs(CatalogManager.java:70)
at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:107)
at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)

2015-06-05T19:30:32.294+0530 INFO Thread-88 io.airlift.bootstrap.LifeCycleManager Life cycle stopping...

Process finished with exit code 1

我使用 brew 安装了 mysql。

【问题讨论】:

    标签: mysql mysql-connector presto


    【解决方案1】:

    当每个 Presto 服务器启动时,它会记录加载了哪些目录。我的猜测是文件不在正确的位置,或者您没有重新启动 Presto 服务器。请注意,该文件必须位于每台 Presto 服务器上。

    【讨论】:

      【解决方案2】:

      “mysql.properties”文件应该存在于 presto-main/etc/catalog 文件夹

      另外, 'presto-main/etc/config.properties' 应该被编辑。 '../presto-mysql/pom.xml' 需要附加在如下所示的plugin.bundles中

      $ cat presto-main/etc/config.properties
      
      # sample nodeId to provide consistency across test runs
      node.id=ffffffff-ffff-ffff-ffff-ffffffffffff
      node.environment=test
      http-server.http.port=8080
      
      discovery-server.enabled=true
      discovery.uri=http://localhost:8080
      
      exchange.http-client.max-connections=1000
      exchange.http-client.max-connections-per-server=1000
      exchange.http-client.connect-timeout=1m
      exchange.http-client.read-timeout=1m
      
      scheduler.http-client.max-connections=1000
      scheduler.http-client.max-connections-per-server=1000
      scheduler.http-client.connect-timeout=1m
      scheduler.http-client.read-timeout=1m
      
      query.client.timeout=5m
      query.max-age=30m
      
      plugin.bundles=\
        ../presto-raptor/pom.xml,\
        ../presto-hive-cdh4/pom.xml,\
        ../presto-example-http/pom.xml,\
        ../presto-kafka/pom.xml,\
        ../presto-tpch/pom.xml,\
        ../presto-mysql/pom.xml
      
      presto.version=testversion
      experimental-syntax-enabled=true
      distributed-joins-enabled=true
      

      【讨论】:

        猜你喜欢
        • 2020-10-11
        • 2015-02-08
        • 2014-02-05
        • 2016-02-22
        • 2014-08-11
        • 1970-01-01
        • 1970-01-01
        • 2016-12-03
        • 2014-01-25
        相关资源
        最近更新 更多