$ cd /opt/hadoop
$ bin/stop-all.sh
$ rm -rf /tmp/hadoop*
$ rm -rf logs/*
$ bin/hadoop namenode -format
$ bin/start-all.sh