hdfs-site.xml上的配置属性是否适用于hadoop中的NameNode? [英] does configuration properties on hdfs-site.xml applies to NameNode in hadoop?

查看:631
本文介绍了hdfs-site.xml上的配置属性是否适用于hadoop中的NameNode?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近为 hadoop 设置了一个测试环境集群 - 一个主控和两个从属。

不是数据节点(尽管有些使用主节点作为主节点和从节点)。
所以基本上我有2个datanodes。复制的默认配置是3.
最初,我没有更改 conf / hdfs-site.xml 上的任何配置。我得到错误只能复制到0节点而不是1
然后我改变了我的主站和从站的 conf / hdfs-site.xml 中的配置,如下所示:


 <属性> 
< name> dfs.replication< / name>
<值> 3< /值>
< / property>

和lo!一切正常。
我的问题是:该配置是否适用于NameNode或DatNode,尽管我在所有datanode和NameNode中更改了hdfs-site.xml。

如果我的理解正确,NameNode会为datanodes分配块。因此 master NameNode 中的复制配置很重要,可能不需要在 datanodes 。这是正确的吗?



我对hadoop框架中不同xml的实际目的感到困惑:从我的小理解:

1) core-site.xml - 整个框架的配置参数,例如日志文件应该放在哪里,文件系统的默认名称是什么等



<2> hdfs-site.xml - 适用于单个数据节点。数据节点的本地文件系统中的数据目录,块的大小等等。
$ b 3) mapred-site.xml - 适用于datanode并为任务跟踪器提供配置。



如果这是错误,请更正。这些配置文件在我的教程中没有很好的解释。所以它来自于我在默认情况下查看这些文件。

解决方案

这通常是由空间不足导致的。



请检查您的集群和使用的总容量,剩余比率使用

  hdfs dfsadmin -report 

同时检查hdfs-site.xml中的dfs.datanode.du.reserved,if这个值比你的剩余容量还要大

寻找其他可能的原因解释这里


I recently set up a test environment cluster for hadoop -One master and two slaves.

Master is NOT a dataNode (although some use master node as both master and slave). So basically I have 2 datanodes. The default configuration for replication is 3. Initially, I did not change any configuration on conf/hdfs-site.xml. I was getting error could only be replicated to 0 nodes instead of 1. I then changed the configuration in conf/hdfs-site.xml in both my master and slave as follows:

<property>
<name>dfs.replication</name>
<value>3</value>
</property>

and lo! everything worked fine. My question is: does this configuration applies to NameNode or DatNode although I changed hdfs-site.xml in all my datanodes and NameNodes.

if my understanding is correct, NameNode allocates the block for datanodes. so replication configuration in master or NameNode is important and probably not needed in datanodes. Is this correct?

I am confused with the actual purpose of different xml in hadoop framework: from my little understanding:

1) core-site.xml - configuration parameters for the entire framework, such as where the logs files should go, what is the default name of the filesystem etc

2) hdfs-site.xml - applies to individual datanodes. how many replication, data dir in the local filesystem of the datanode, size of the block etc

3) mapred-site.xml - applies to datanode and gives configuration for the task tracker.

please correct if this is wrong. These configuration files are not well explained in the tutorials I had. so it comes from my look into these files in the defaults.

解决方案

this is usually caused by insufficient space.

please check the total capacity of your cluster and used, remaining ratio using

  hdfs dfsadmin -report

also check dfs.datanode.du.reserved in the hdfs-site.xml, if this value is larger than your remained capacity

look for other possible causes explained here

这篇关于hdfs-site.xml上的配置属性是否适用于hadoop中的NameNode?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆