title: Setting hadoop.tmp.dir in /tmp
body: <p>I saw in Hadoop documentation <a href="https://hadoop.apache.org/docs/r2.7.2/hadoop-project-dist/hadoop-common/core-default.xml" rel="nofollow noreferrer">1</a> the default value for <code>hadoop.tmp.dir</code> is <code>/tmp/hadoop-${user.name}</code> but if I set it in that way, when machine restarts, do I loss the data?</p>
  
  <p>I mean, maybe I do not have to set this in the real <code>/tmp</code>, but I need to do it in <code>/home/myuser/tmp/hadoop-${user.name}</code> ?</p>
  
  <p>Thank you in advance!</p>
  
  <p><strong>Adding information:</strong></p>
  
  <p>I set it in /tmp/hadoop-hduser, but the computer was interrupted due to electrical power problems and today I got this message: <code>Call From java.net.UnknownHostException: hduser-machine: hduser-machine to localhost:54310 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused</code> and I ran this command <code>hadoop namenode</code> and I got this: <code>ERROR namenode.NameNode: Failed to start namenode.
  org.apache.hadoop.hdfs.server.common.InconsistentFSStateException: Directory /tmp/hadoop-hduser/dfs/name is in an inconsistent state: storage directory does not exist or is not accessible.</code>  And I thought that it was due to the /tmp configuration...</p>