In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "TODO how to simulate namenode crash and recovery", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "how TODO simulates namenode crash and recovery" this article.
TODO: there are still things that are not clear.
1. To facilitate the demonstration, first configure the namenode checkpoint. See Control the frequency of namenode checkpoints.
2. Start hadoop to ensure that all nodes are normal.
3. Delete all the contents in the dfs.name.dir specified directory (that is, the name directory) on the namenode node to simulate the failure.
4. Close the hadoop,jps view and find that namenode did not start successfully.
Look at the log of namenode in the $HADOOOP_HOME/logs/ directory of the namenode node and find the exception: java.io.IOException: NameNode is not formated.
At the same time, check the directories and files on hdfs, and find the error after ls.
5. Close hadoop and reformat namenode
6. Enter the dfs.name.dir specified directory on the namenode node (that is, the name directory), and find that the new content has been generated. Edit the VERSION in current. Change the value of namespaceID to the namespaceID in any datanode in the cluster (that is, the original value)
7. Delete the newly generated fsimage in current
8. Copy the fsimage of secondarynamenode.
Note: I copied it from the namesecondary/image/ directory. There is some information on the Internet that it is under namesecondary/current, but there is no content in my current.
9. Start hadoop
10. After the start-up, I found that everything was normal.
These are all the contents of the article "how TODO simulates namenode crash and recovery". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.