背景:用本地的Hadoop测试Java调用cmd命令
javascript
2024-12-08 13:48:19,826 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
ls: `.': No such file or directory
解决方案:
javascript
首先,编辑日志的配置文件
vim etc/hadoop/log4j.properties
然后将下面的语句添加到问年末尾处:
log4j.logger.org.apache.hadoop.util.NativeCodeLoader=ERROR