Не удалось подключить базу данных Mysql к presto - нет фабрики для соединителя mysql

Я всегда получаю эту ошибку при попытке запустить сервер Presto в Intellij.
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

Я установил mysql с помощью brew.


person sumanth232    schedule 05.06.2015    source источник


Ответы (2)


Когда каждый сервер Presto запускается, он регистрирует, какие каталоги были загружены. Я предполагаю, что файл находится не в том месте, или вы не перезапустили серверы Presto. Обратите внимание, файл должен быть на каждом сервере Presto.

person Dain Sundstrom    schedule 05.06.2015

Файл 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
person sumanth232    schedule 08.06.2015