Wednesday, December 21, 2011

MapReduce Filesystem Recovery


Administration Lab 5:  MapReduce Filesystem Recovery

Restore the Last State of VM
*    Open Virtual Box application
*    Start the last VM state
*    Stop Hadoop cluster
for x in /etc/init.d/hadoop-* ; do sudo $x stop; done
Procedure to Recover Namenode
*    Change user to hdfs
sudo su hdfs
*    Lets try to import image
hadoop-0.20 namenode –importCheckpoint
*    This will fail!!! (Why???)
*    Lets move data to home directory
mkdir ~/name
mv /var/lib/hadoop-0.20/cache/hadoop/dfs/name/* ~/name
ls /var/lib/hadoop-0.20/cache/hadoop/dfs/name
*    Lets try import again
hadoop-0.20 namenode –importCheckpoint
*    This will work!
*    Ctrl-C to terminate node and exit from shell
*    Start the cluster
for x in /etc/init.d/hadoop-* ; do sudo $x start; done
Checking Filesystem
hadoop-0.20 fsck <file name> -files -blocks -racks

No comments:

Post a Comment