我正在使用 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")
在哪里添加这个配置文件?向该配置文件添加什么?
最佳答案
别担心,这只是一个恼人的警告。仅当您在长期存在的应用程序中运行 s3a 或 abfs 连接器时才相关,在该应用程序中收集指标并将其提供给某些管理工具。
在 spark conf 目录的 log4j.properties 文件中将日志级别设置为警告
log4j.logger.org.apache.hadoop.metrics2=WARN
关于amazon-web-services - Hadoop s3 配置文件丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64400948/