You saved the day again.
The FSEditLogTool worked like a charm, without modifications
(https://issues.apache.org/jira/browse/HADOOP-915).
Here is what I did to perform an undelete of the root directory on my
HDFS (hadoop 0.12.2.)
- first, I ran a few tests on another dfs to make sure the FSEditLogTool
worked (and I understood what is was doing). Then on the affected dfs:
- kill the namenode (already did that asap, and to be sure, I stopped
all other hadoop daemons)
- run FSEditLogTool -dump ${dfs.name.dir}/edits edits.txt
- remove the last line from edits.txt which contains the DELETE entry.
- run FSEditLogTool -restore edits.txt ${dfs.name.dir}/edits
- start the namenode and datanodes again
- I had to turn off save-mode manually:
$ bin/hadoop dfsadmin -safemode leave
\o/
Andrzej Bialecki wrote:
Mathijs Homminga wrote:
Thanks,
I stopped the namenode. How can I remove an entry from the editlog?
I wrote a tool for specifically this purpose ;) but it's not up to
date anymore - I'm not sure how much hacking is required to make it
work again. See HADOOP-915.
--
Knowlogy
Helperpark 290 C
9723 ZA Groningen
[EMAIL PROTECTED]
+31 (0)6 15312977
http://www.knowlogy.nl