Name Node Trash Check Point Interval & TGTs on Non-HA NN with KMS
Luke Hebert
- 2 minutes read - 233 wordsIf your non-HA NameNode is running with KMS and you are seeing TGT (Ticket Granting Ticket) renewal problems, the trash checkpoint interval is a likely culprit. The NameNode periodically scans the trash directory, and if that scan happens at a frequency that collides with TGT renewal windows, you can see authentication errors surface. Tuning the interval to roughly 40% of your TGT lifetime gives the NameNode a comfortable margin and eliminates the collision.
How to Calculate the Interval
The recommended frequency is about 40% of the TGT lifetime, expressed in minutes.
- TGT lifetime of 10 hours: renew every 4 hours, which is 240 minutes.
- TGT lifetime of 5 hours: renew every 2 hours, which is 120 minutes.
Applying the Configuration
Append the following property to the Cloudera Manager path:
CM > HDFS > Configuration > “NameNode Advanced Configuration Snippet (Safety Valve) for hdfs-site.xml”
<property>
<name>fs.trash.checkpoint.interval</name>
<value>240</value> <!-- Every 4 hours, in minutes -->
</property>After saving, roll the NameNode service to pick up the new value.
This change does not alter the Trash deletion frequency, which is still governed by the default or custom trash retention period (fs.trash.interval). It changes only the rate at which the NameNode checks files in trash and marks them as ready for deletion at the next cleanup cycle. The NameNode does not delete files during the checkpoint scan, so this is a safe change to make.