How to clear local file cache and user cache for yarn
To clear local file cache and user cache for yarn, perform the following:
- Find out the cache location by checking the value of the yarn.nodemanager.local-dirs property :
<property>
<name>yarn.nodemanager.local-dirs</name>
<value>/hadoop/yarn/local</value>
</property> - Remove filecache and usercache folder located inside the folders that is specified in yarn.nodemanager.local-dirs.
If there are more than one folder, clean them one by one.[yarn@node2 ~]$ cd /hadoop/yarn/local/
[yarn@node2 local]$ ls filecache nmPrivate spark_shuffle usercache
[yarn@node2 local]$ rm -rf filecache/ usercache/ - Restart YARN service.

