Presto无法使用localfile连接器创建注入器

时间:2016-07-04 19:28:20

标签: presto

我在macOS 10.11上使用presto-server-0.149。仅仅为了测试目的,我运行一个节点,一切都很好。当我添加etc/catalog/localfile.properties时:

connector.name=localfile
presto-logs.http-request-log-location=/var/log/apache2/access_log

我收到以下错误:

2016-07-04T12:02:45.435-0700    INFO    main    io.airlift.bootstrap.LifeCycleManager   Life cycle starting...
2016-07-04T12:02:45.435-0700    INFO    main    io.airlift.bootstrap.LifeCycleManager   Life cycle startup complete. System ready.
2016-07-04T12:02:45.436-0700    INFO    main    com.facebook.presto.metadata.CatalogManager -- Added catalog jmx using connector jmx --
2016-07-04T12:02:45.436-0700    INFO    main    com.facebook.presto.metadata.CatalogManager -- Loading catalog etc/catalog/localfile.properties --
2016-07-04T12:02:45.797-0700    INFO    main    Bootstrap   PROPERTY                               DEFAULT                   RUNTIME                   DESCRIPTION
2016-07-04T12:02:45.797-0700    INFO    main    Bootstrap   presto-logs.http-request-log.pattern   null                      null                      If log location is a directory this glob is used to match the file names in the directory
2016-07-04T12:02:45.797-0700    INFO    main    Bootstrap   presto-logs.http-request-log.location  var/log/http-request.log  var/log/http-request.log  Directory or file where http request logs are written
2016-07-04T12:02:45.797-0700    INFO    main    Bootstrap   
2016-07-04T12:02:45.797-0700    WARN    main    Bootstrap   UNUSED PROPERTIES
2016-07-04T12:02:45.797-0700    WARN    main    Bootstrap   presto-logs.http-request-log-location=/var/log/apache2/access_log
2016-07-04T12:02:45.797-0700    WARN    main    Bootstrap   
2016-07-04T12:02:45.989-0700    ERROR   main    com.facebook.presto.server.PrestoServer Unable to create injector, see the following errors:

1) Configuration property 'presto-logs.http-request-log-location=/var/log/apache2/access_log' was not used
  at io.airlift.bootstrap.Bootstrap.lambda$initialize$2(Bootstrap.java:235)

1 error
com.google.inject.CreationException: Unable to create injector, see the following errors:

1) Configuration property 'presto-logs.http-request-log-location=/var/log/apache2/access_log' was not used
  at io.airlift.bootstrap.Bootstrap.lambda$initialize$2(Bootstrap.java:235)

1 error
    at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:466)
    at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
    at com.google.inject.Guice.createInjector(Guice.java:96)
    at io.airlift.bootstrap.Bootstrap.initialize(Bootstrap.java:242)
    at com.facebook.presto.localfile.LocalFileConnectorFactory.create(LocalFileConnectorFactory.java:64)
    at com.facebook.presto.connector.ConnectorManager.createConnector(ConnectorManager.java:315)
    at com.facebook.presto.connector.ConnectorManager.addCatalogConnector(ConnectorManager.java:169)
    at com.facebook.presto.connector.ConnectorManager.createConnection(ConnectorManager.java:162)
    at com.facebook.presto.connector.ConnectorManager.createConnection(ConnectorManager.java:148)
    at com.facebook.presto.metadata.CatalogManager.loadCatalog(CatalogManager.java:99)
    at com.facebook.presto.metadata.CatalogManager.loadCatalogs(CatalogManager.java:77)
    at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:115)
    at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:63)

更新

根据Dain Sundstrom在下面的回答,我能够解决我的问题。原来,Local File Connector的fb文档不正确。由于我需要为Presto提供一些东西来测试localfile连接器,我将配置文件路径更改为Presto自己的请求日志:

presto-logs.http-request-log.location=/var/presto/data/var/log/http-request.log

1 个答案:

答案 0 :(得分:1)

配置属性中有拼写错误。它应该是:

presto-logs.http-request-log.location=/var/log/apache2/access_log

此外,此连接器只能处理Presto自身创建的http日志格式,因此您需要重新配置Apache2服务器以输出相同的格式。

相关问题