Support Questions
Find answers, ask questions, and share your expertise

Namenode metadata directory shrinking is not working

I am using hadoop apache 2.7.1 cluster on centos 7 and my cluster is high available.

In order to stop namenode metadata folder growth because of edits found and that are not needed because they are older than fsimage I put the following properties in hdfs-site.xml

<property>
   <name>dfs.namenode.max.extra.edits.segments.retained</name>
   <value>100</value>
</property>

<property>
   <name>dfs.namenode.num.extra.edits.retained</name>
   <value>100</value>
</property>

But when I started name node no old edits were burnt down .

Do new edits (I mean edits which their date is after hdfs-site.xml edit date with theses two properties ) only follow this two properties rules or this edit of hdfs-site should have effects on old edits (which are found from first name node launch in cluster)

Is editing hdfs-site.xml by theses two properties is the best way to shrink name node metadata dir?