restore hadoop primary namenode from secondary namenode checkpoint step by step
2014-04-17 17:07
525 查看
scenario hadoop2.2
assume everything is ready excepte hadoop2.2.
1) install hadoop namenode
2) format namenode
3) delete current foulder (all namenode edit files) in "D:\hdpdata\hdfs\nn" and copy checkpoint folder "current" from secondary namenode(maybe d:\hdpdata\hdfs\snn) to primary namenode(d:\hdpdata\hdfs\snn )
4) Restore from checkpoint dir
Run cmd.exe by user hadoop ( or some users have full permission )
Use this command to start hadoop service and import checkpoint from checkpoint dir
Use ctrl+C to stop service which is completed. and Delete your namenode's checkpoint dir (dfs.namenode.checkpoint.dir the same as secondary namenode)
Start service by this command:
Levae safemode
Balance you HDFS:
5. Confirm your Hadoop service is restored successfully.
Open URL http://namenode:50070/ to check if there are some missing block. If yes. Please kindly check where they are and what they are.
Because restore from secondary namenode isn't a real time restore solution. It may lost the last time what you do in the jobtracker. It doesn't matter. Just delete them.
assume everything is ready excepte hadoop2.2.
1) install hadoop namenode
cmd>msiexec /qb /i "hdp-win-2.0.6.msi" /lv "hdp.log" HDP_LAYOUT="D:\config\clusterproperties.txt" HDP_DIR="D:\hdp\hadoop" HDP_USER_PASSWORD="Mar19@Updat" DESTROY_DATA="no"
2) format namenode
cmd>hdfs namenode -format
3) delete current foulder (all namenode edit files) in "D:\hdpdata\hdfs\nn" and copy checkpoint folder "current" from secondary namenode(maybe d:\hdpdata\hdfs\snn) to primary namenode(d:\hdpdata\hdfs\snn )
4) Restore from checkpoint dir
Run cmd.exe by user hadoop ( or some users have full permission )
Runas /user:hadoop cmd.exeYou must have user hadoop password.
Use this command to start hadoop service and import checkpoint from checkpoint dir
cmd>%hadoop_home%/bin/hdfs namenode -importcheckpoint
Use ctrl+C to stop service which is completed. and Delete your namenode's checkpoint dir (dfs.namenode.checkpoint.dir the same as secondary namenode)
Start service by this command:
cmd>start_local_hdp_services.cmd
Levae safemode
cmd>%hadoop_home%/bin/hdfs dfsadmin -safemode leave
Balance you HDFS:
cmd>%hadoop_home%/bin/hdfs balancer -threshold 5
5. Confirm your Hadoop service is restored successfully.
Open URL http://namenode:50070/ to check if there are some missing block. If yes. Please kindly check where they are and what they are.
Because restore from secondary namenode isn't a real time restore solution. It may lost the last time what you do in the jobtracker. It doesn't matter. Just delete them.
相关文章推荐
- ERROR org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: Exception in doCheckpoint
- bug:ERROR org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: Exception in doCheckpoint
- Secondary NameNode,Checkpoint Node,Backup Node,HDFS HA
- Hadoop-2.4.1学习之SecondaryNameNode、CheckpointNode、BackupNode
- secondary namenode checkpoint失败
- 浅谈Hadoop NameNode、SecondaryNameNode、CheckPoint Node和BackupNode
- Namenode HA自动切换 从Namenode报错Got a command from standby NN - ignoring command:2
- 【框架解析】Hadoop系统分析(六)--secondarynamenode
- hadoop secondarynamenode
- Hadoop2的高可用并取代SecondaryNamenode
- hadoop 配置文件 masters 以及 namenode, jobtracker, secondary namenode
- 【大数据系列】在hadoop2.8.0下配置SecondaryNameNode
- Hadoop中的Namenode、Datanode和Secondary Namenode
- HDFS学习笔记2 -- 关于Secondary NameNode, Checkpoint Node, Backup Node和High Availability (HA)
- hadoop secondarynamenode的作用
- Hadoop series :The solution about nameNode single point failure
- restore from checkpoint时cpu类型选择 -- 切记
- Restore list by name from recyclebin via powershell
- 启动hadoop报ERROR org.apache.hadoop.hdfs.server.namenode.FSImage: Failed to load image from FSImageFile
- hadoop之NameNode,DataNode,Secondary NameNode