hadoop.tmp.dir (A base for other temporary directories) is property, that need to be set in core-site.xml
Ex:
<name>dfs.namenode.name.dir</name>
<value>file://${hadoop.tmp.dir}/dfs/name</value>
You can use reference of hadoop.tmp.dir in hdfs-site.xml like above
For more core-site.xml and hdfs-site.xml
There're three HDFS properties which contain hadoop.tmp.dir in their values
dfs.name.dir: directory where namenode stores its metadata, with default value ${hadoop.tmp.dir}/dfs/name.
dfs.data.dir: directory where HDFS data blocks are stored, with default value ${hadoop.tmp.dir}/dfs/data.
fs.checkpoint.dir: directory where secondary namenode store its checkpoints, default value is${hadoop.tmp.dir}/dfs/namesecondary