您好,请您帮我解决这个错误?
[hadoop@bigdata hadoop]$ bin/hdfs dfs -put /var/log/httpd logs
15/05/10 10:51:06 WARN util.NativeCodeLoader:无法为您的平台加载native-hadoop库。使用适用的builtin-java类 put:访问文件时出错:/ var / log / httpd
答案 0 :(得分:0)
[hadoop @ bigdata hadoop] $ bin / hdfs dfs -put / var / log / httpd logs
hdfs dfs -mkdir /logs
hdfs dfs -put /var/log/httpd/*.* /logs/
注意:如果您无法复制到HDFS,则可能是文件夹/ var / log / httpd上的权限问题
sudo mkdir -p /usr/local/httpdlogs
sudo chown hadoop:hadoop -R /usr/local/httpdlogs
sudo cp /var/log/httpd/*.* /usr/local/httpdlogs/
hdfs dfs -put /usr/local/httpdlogs/*.* /logs/