由于Ubuntu每次重启以后都会将/tmp目录清空,而默认配置下每次hadoop name node -format老是将数据信息定位到/tmp/hadoop-${user.name}中,所以须要修改etc/hadoop/core-sites.xml文件,增长property指定临时目录到别的目录。html
<property> <name>hadoop.tmp.dir</name> <value>/opt/hadoop/hadoop-2.7.2/mydata/hadoop-${user.name}</value> <description>A base for other temporary directories.</description> </property>
参考:
http://www.dataguru.cn/thread-135211-1-1.htmlnode