如果 fs.default.name 在 core-site.xml 指向 hdfs://localhost:54310/ 带或不带尾随 / 即使您有相同的问题,那么您可能会看到错误的配置文件。在我的例子中,它是cloudera的cdh4,请检查符号链接: ls -l /etc/hadoop/conf**/etc/hadoop/conf -> /etc/alternatives/hadoop-conf ls -l /etc/alternatives/hadoop-conf**/etc/alternatives/hadoop-conf -> /etc/hadoop/conf.cloudera.yarn1 之前我使用了mrv1并迁移到了mrv2(yarn),升级后sym链接被破坏为: ls -l /etc/hadoop/conf**/etc/hadoop/conf -> /etc/alternatives/hadoop-conf ls -l /etc/alternatives/hadoop-conf**/etc/alternatives/hadoop-conf -> /etc/hadoop/conf.cloudera.mapreduce1 ls -l /etc/hadoop/conf.cloudera.mapreduce1 ls: cannot access /etc/hadoop/conf.cloudera.mapreduce1: No such file or directory Also, update-alternatives was run to have high priority for /etc/hadoop/conf.cloudera.mapreduce1 path as: alternatives --display hadoop-conf hadoop-conf - status is manual. link currently points to /etc/hadoop/conf.cloudera.mapreduce1 /etc/hadoop/conf.cloudera.hdfs1 - priority 90 /etc/hadoop/conf.cloudera.mapreduce1 - priority 92 /etc/hadoop/conf.empty - priority 10 /etc/hadoop/conf.cloudera.yarn1 - priority 91 Current best' version is /etc/hadoop/conf.cloudera.mapreduce1. To remove old link which has highest priority do:update-alternatives --remove hadoop-conf /etc/hadoop/conf.cloudera.mapreduce1 rm -f /etc/alternatives/hadoop-conf ln -s /etc/hadoop/conf.cloudera.yarn1 /etc/alternatives/hadoop-conf`
3条答案
按热度按时间gupuwyp21#
我也有同样的问题,我必须确保
fs.default.name
的值包含尾部/
要引用路径组件:c7rzv4ha2#
如果
fs.default.name
在core-site.xml
指向hdfs://localhost:54310/
带或不带尾随/
即使您有相同的问题,那么您可能会看到错误的配置文件。在我的例子中,它是cloudera的cdh4,请检查符号链接:ls -l /etc/hadoop/conf**/etc/hadoop/conf -> /etc/alternatives/hadoop-conf ls -l /etc/alternatives/hadoop-conf**/etc/alternatives/hadoop-conf -> /etc/hadoop/conf.cloudera.yarn1
之前我使用了mrv1并迁移到了mrv2(yarn),升级后sym链接被破坏为:ls -l /etc/hadoop/conf**/etc/hadoop/conf -> /etc/alternatives/hadoop-conf ls -l /etc/alternatives/hadoop-conf**/etc/alternatives/hadoop-conf -> /etc/hadoop/conf.cloudera.mapreduce1 ls -l /etc/hadoop/conf.cloudera.mapreduce1 ls: cannot access /etc/hadoop/conf.cloudera.mapreduce1: No such file or directory
Also, update-alternatives was run to have high priority for /etc/hadoop/conf.cloudera.mapreduce1 path as: alternatives --display hadoop-conf hadoop-conf - status is manual. link currently points to /etc/hadoop/conf.cloudera.mapreduce1 /etc/hadoop/conf.cloudera.hdfs1 - priority 90 /etc/hadoop/conf.cloudera.mapreduce1 - priority 92 /etc/hadoop/conf.empty - priority 10 /etc/hadoop/conf.cloudera.yarn1 - priority 91 Currentbest' version is /etc/hadoop/conf.cloudera.mapreduce1. To remove old link which has highest priority do:
update-alternatives --remove hadoop-conf /etc/hadoop/conf.cloudera.mapreduce1 rm -f /etc/alternatives/hadoop-conf ln -s /etc/hadoop/conf.cloudera.yarn1 /etc/alternatives/hadoop-conf`yfwxisqw3#
检查一下
fs.default.name
在core-site.xml
指向ex中的正确数据节点: