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

How to change nodemanager pid directory?


how can I change the path directory? right now it is in /tmp/ but I want it to change it to /data/tmp/ because the /tmp is now in full capacity? May i know how I can change it?



hi @stevenmatison maybe you are familiar on this?

@Mondi you would need to manually change it in the configuration.   I checked out ambari and it should be YARN PID Dir Prefix /var/run/hadoop-yarn and its not editable.   In the yarn-env template you can override it manually.  Search "yarn_pid_dir" in the config:


Screen Shot 2020-06-23 at 8.32.49 AM.png



I might also suggest to make sure your /tmp partitions are big enough before installing.  Another trick is to move /tmp to a larger partition by symlink.   Like this:


mv /tmp /tmpOldPartition
mkdir /data/tmp
ln -s /data/tmp /tmp



If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.  



Steven @ DFHZ


Hi Steven, i'm using Cloudera CDH 6.3, how can I check it here via Cloudera Manager?

@Mondi finding the value should be similar.  Go into Yarn config and search for "pid" or "".  You could also search for "/tmp" since you may need to change all of the instances to /data/tmp .    If there are many configs using /tmp and /tmp is too small,  I suggest my other idea to make sure /tmp is really on a larger disk partition.  Make sure /data/tmp and original /tmp have the same permissions too.

; ;