Presto 无法使用本地文件连接器创建注入器

Presto unable to create injector with localfile connector

我在 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(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(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 以测试本地文件连接器,因此我将配置文件路径更改为 Presto 自己的请求日志:

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

您的配置有误 属性。应该是:

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

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