今天运行了mahout程序,生成的结果放在hdfs://master:9000/output/result目录下,当时通过上下键不小心执行了一个删除命令,将该目录下的数据删除掉了,当时都有点傻了,虽然是测试数据,但程序运行了大概20分钟才生成的结果,我回到回收站里看,没有任何东西,是因为我当时没有配置回收站。
所以马上配置,然后并没有重启服务,就发现生效了。我是用hadoop-1.1.2 ,不知道其他版本是不是也这样。
core-site.xml:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://master:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/root/hadoop_data/tmp</value>
</property>
<property>
<name>fs.trash.interval</name>
<value>1440</value>
<description>Number of minutes between trash checkpoints. If zero, the trash feature is disabled. </description>
</property>
</configuration>