【问题标题】:Hadoop s3 configuration file missingHadoop s3 配置文件丢失
【发布时间】:2021-01-31 16:07:23
【问题描述】:

我正在使用 Hadoop 库在 S3 中上传文件。由于缺少一些指标配置文件,我得到了这个异常

MetricsConfig - Could not locate file hadoop-metrics2-s3a-file-system.properties org.apache.commons.configuration2.ex.ConfigurationException: 

Could not locate: org.apache.commons.configuration2.io.FileLocator@77f46cee[fileName=hadoop-metrics2-s3a-file-system.properties,basePath=<null>,sourceURL=,encoding=<null>,fileSystem=<null>,locationStrategy=<null>]

我目前的配置是

configuration.set("fs.s3a.access.key", "accessKey")
configuration.set("fs.s3a.secret.key", "secretKey")

在哪里添加这个配置文件?向该配置文件添加什么?

【问题讨论】:

    标签: amazon-web-services scala hadoop amazon-s3


    【解决方案1】:

    别担心,这只是一个恼人的警告。仅当您在长期存在的应用程序中运行 s3a 或 abfs 连接器时才有意义,该应用程序正在收集指标并将其提供给某些管理工具。

    在您的 spark conf 目录中的 log4j.properties 文件中将日志级别设置为警告

    log4j.logger.org.apache.hadoop.metrics2=WARN
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-04-14
      • 2017-07-30
      • 1970-01-01
      • 2012-02-12
      相关资源
      最近更新 更多