hadoop - Where moved to trash files go? -
i have following questions regarding "move trash" functionality in hue gui:
- where these files go?
- how long stored?
- can restore them?
1) /user/hduser/.trash
hduser unix(operating system user, can windows user if using java client windows + eclipse ) user. 2) depend on below configuration in core-site.xml
<property> <name>fs.trash.interval</name> <value>30</value> <description>number of minutes after checkpoint gets deleted. if zero, trash feature disabled. </description> </property>
3) doing recovery method trash should enabled in hdfs. trash can enabled setting property fs.trash.interval
(as above mentioned xml) greater 0.
by default value zero. value number of minutes after checkpoint gets deleted. if zero, trash feature disabled. have set property in core-site.xml.
there 1 more property having relation above property called fs.trash.checkpoint.interval
. number of minutes between trash checkpoints. should smaller or equal fs.trash.interval
.
everytime checkpointer runs, creates new checkpoint out of current , removes checkpoints created more fs.trash.interval
minutes ago. default value of property zero.
<property> <name>fs.trash.checkpoint.interval</name> <value>15</value> <description>number of minutes between trash checkpoints. should smaller or equal fs.trash.interval. every time checkpointer runs creates new checkpoint out of current , removes checkpoints created more fs.trash.interval minutes ago. </description> </property>
if above properties enabled in cluster. deleted files present in .trash directory of hdfs. have time recover files until next checkpoint occurs. after new checkpoint deleted files not present in .trash. recover before new checkpoint. if property not enabled in cluster, can enable future recovery.. :)
Comments
Post a Comment