In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how hadoop restores Namenode according to SecondaryNameNode, I believe most people don't know much about it, so share this article for your reference. I hope you can learn a lot after reading this article. Let's learn about it together.
Manufacturing namenode downtime
1) kill the process of dropping namenode
[hadoop@hadoop bin] $kill-9 13481
2) Delete the folder pointed to by dfs.name.dir, here is / home/hadoop/hdfs/name.
Current image in_use.lock previous.checkpoint [hadoop@hadoop name] $rm-rf *
Delete everything under the name directory, but you must make sure that the name directory exists
3) copy the metadata from secondarynamenode namesecondary directory to namenode name directory
My secodarynamenode metadata directory
/ home/hadoop/tmp/dfs/namesecondary
Replication process
[hadoop@hadoop name] $cp-R / home/hadoop/tmp/dfs/namesecondary/*.
4) start namenode
[hadoop@hadoop bin] $. / hadoop-daemon.sh start namenode
5) check
Use the hadoop fsck / user command to check the integrity of the file Block
[hadoop@hadoop bin] $hadoop fsck / Warning: $HADOOP_HOME is deprecated.FSCK started by hadoop from / 192.168.0.101 for path / at Sun Dec 22 23:04:31 CST 2013../home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310222119_0001/job.jar: Under replicated blk_-8571652065964704775_1020. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310222119_0002/job.jar: Under replicated blk_-5947701456602696019_1021. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310222119_0003/job.jar: Under replicated blk_8214183112681524571_1022. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310222142_0001/job.jar: Under replicated blk_4805420250921446015_1024. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310222142_0002/job.jar: Under replicated blk_7913185784171356584_1027. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310222142_0004/job.jar: Under replicated blk_-8411847042533891069_1035. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310222142_0005/job.jar: Under replicated blk_2163772543235273521_1036. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310222142_0007/job.jar: Under replicated blk_-3491660194168043022_1044. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310242056_0002/job.jar: Under replicated blk_5280511346594851641_1270. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310242056_0003/job.jar: Under replicated blk_5588149584508213931_1271. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310242056_0004/job.jar: Under replicated blk_-1846184614352398688_1272. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310242056_0005/job.jar: Under replicated blk_8253537375261552577_1273. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310242100_0001/job.jar: Under replicated blk_-6858089306760733073_1275. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310242100_0002/job.jar: Under replicated blk_-630176777256891004_1276. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310242100_0003/job.jar: Under replicated blk_3453389521553623867_1277. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310242100_0004/job.jar: Under replicated blk_-4262000880964323956_1278. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310242105_0001/job.jar: Under replicated blk_-5324801167724976561_1280. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310242105_0002/job.jar: Under replicated blk_3284342834321881345_1281. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310242105_0004/job.jar: Under replicated blk_5174401550469241860_1295. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310242105_0009/job.jar: Under replicated blk_6390129220783606015_1327. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201310242105_0010/job.jar: Under replicated blk_8995477665353821346_1328. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201311292212_0007/job.jar: Under replicated blk_-6447241034801532571_1699. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201312082210_0001/job.jar: Under replicated blk_-187920261151639503_1741. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201312082210_0002/job.jar: Under replicated blk_1912732980088631445_1742. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/staging/hadoop/.staging/job_201312092348_0001/job.jar: Under replicated blk_448639237400606735_1953. Target Replicas is 10 but found 1 replica (s).. / home/hadoop/tmp/mapred/system/jobtracker.info: CORRUPT block blk_-4973841422235657473/home/hadoop/tmp/mapred/system/jobtracker.info: MISSING 1 blocks of total size 4 B.Status: CORRUPTTotal size: 367257 BTotal dirs: 83Total files: 60Total blocks (validated): 57 (avg. Block size 6443 B) * * CORRUPT FILES: 1 MISSING BLOCKS: 1 MISSING SIZE: 4 B CORRUPT BLOCKS: 1 * * Minimally replicated blocks: 56 (98 .0%) Over-replicated blocks: 0 (24561) Under-replicated blocks: 25 (43.85965) Mis-replicated blocks: 0 (0.0%) Default replication factor: 1Average block replication: 0.98245615Corrupt blocks: 1Missing replicas: 24561 (401.7857) Number of data-nodes: 1Number of racks : 1FSCK ended at Sun Dec 22 23:04:31 CST 2013 in 89 milliseconds
The recovery work is complete. Check the hdfs data.
The above is all the contents of the article "how hadoop recovers Namenode according to SecondaryNameNode". 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.