Hadoop s3 配置文件丢失

Har*_*urr 6 hadoop scala amazon-s3 amazon-web-services

我正在使用 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>]
Run Code Online (Sandbox Code Playgroud)

我当前的配置是

configuration.set("fs.s3a.access.key", "accessKey")
configuration.set("fs.s3a.secret.key", "secretKey")
Run Code Online (Sandbox Code Playgroud)

在哪里添加这个配置文件呢?要在该配置文件中添加什么?

Ste*_*ran 4

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

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

log4j.logger.org.apache.hadoop.metrics2=WARN
Run Code Online (Sandbox Code Playgroud)