I have 3 nodes Hadoop 2.7.3 cluster which can be described as follows:
The problem is that on node A there is a high disk usage (about 95%). What I would like to achieve is to limit the disk usage so that it will never be more than 85%.
I tried to set the dfs.namenode.resource.du.reserved
property to somewhat about 3gb but it does not solve my problem because as soon as available disk space is lower than that value, my Hadoop enters safemode immediately.
I know that all required resources must be available for the NN to continue operating and that the NN will continue to operate as long as any redundant resource is available.
Also, I know about the dfs.namenode.edits.dir.required
property which defines required resources, but I don't think that making NN redundant instead of required is a good idea.
So my question is as in the topic. How can I say to Hadoop: "Hey, listen. This is a datanode, put anything you want here, but if the disk usage will be higher than 85% then do not panic- just stop putting anything here and continue to do your thing on the rest of DN."?
Am I missing something? Is it even possible? If not, then what would you guys suggest doing?
There is a process called Namenode resource checker which scans the Namenode storage volumes for available free disk space. Whenever the available free space falls below the value specified in the dfs.namenode.resource.du.reserved
property (default 100MB), it forces the Namenode to enter safemode.
Setting it to 3GB would expect that free space on this node. But the Datanode would be consuming all the available free space for its data storage not considering the disk space requirements of the Namenode.
Limit the datanode's disk usage on this particular node, add this property to hdfs-site.xml
<property>
<name>dfs.datanode.du.reserved</name>
<value>3221225472</value>
<description>3GB of disk space reserved for non DFS usage.
This space will be left unconsumed by the Datanode.
</description>
</property>
Change the reserved space value as per your required threshold.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With