- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
What's the difference of -bootstrapstandby and -rollback for NameNode in HDFS rolling upgrade?
- Labels:
-
Apache Hadoop
Created ‎06-23-2016 12:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In HDFS documentation, it said the steps to do rollback of rolling upgrade:
- Shutdown all NNs and DNs.
- Restore the pre-upgrade release in all machines.
- Start NN1 as Active with the "-rollingUpgrade rollback" option.
- Run `-bootstrapStandby' on NN2 and start it normally as standby.
- Start DNs with the "-rollback" option.
Why do both NameNodes have different option? E.g. for NN1, -rollingUpgrade rollback, AND for NN2, '-bootstrapStandby' instead must be used.
What's the difference of '-bootstrapstandby' and '-rollback'?
In addition, it's expected to explain what happened behind hoods if any of the two is specified.
Thank you!
Created ‎06-23-2016 01:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- "rollingUpgarde rollback" on NN1 means that both hdfs software and data in hdfs will be reverted back to the state before starting the rolling upgrade. Any changes to hdfs (files added to or deleted) will be lost. NN1 will become active NN.
- "bootstrapStandby" on NN2 means that metadata from NN1 will be copied to NN2. After startup NN2 will become Stand by NN.
What happens behind the stage: when you start the rolling upgrade with "rollingUpgrade prepare" a copy of NN metadata (FSImage) is created, called "previous". It consists of hard links to the "current" FSImage. When you do "rollingUpgrade rollback", "current" FSImage is replaced by "previous", that's why all hdfs changes are lost. If you want to keep the changes you can use "rollingUpgrade downgrade", it will downgrade only software, keeping hdfs image intact. You can find more details here.
Created ‎06-23-2016 01:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- "rollingUpgarde rollback" on NN1 means that both hdfs software and data in hdfs will be reverted back to the state before starting the rolling upgrade. Any changes to hdfs (files added to or deleted) will be lost. NN1 will become active NN.
- "bootstrapStandby" on NN2 means that metadata from NN1 will be copied to NN2. After startup NN2 will become Stand by NN.
What happens behind the stage: when you start the rolling upgrade with "rollingUpgrade prepare" a copy of NN metadata (FSImage) is created, called "previous". It consists of hard links to the "current" FSImage. When you do "rollingUpgrade rollback", "current" FSImage is replaced by "previous", that's why all hdfs changes are lost. If you want to keep the changes you can use "rollingUpgrade downgrade", it will downgrade only software, keeping hdfs image intact. You can find more details here.
Created ‎06-23-2016 07:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To explain why you use different commands for the two nodes:
The idea here is that you don't want both nodes to attempt the rollback and risk becoming inconsistent. In a perfect world you could probably do the rollback on both, but the world isn't perfect.
The best way to guarantee consistency is to have one node do the rollback and then rebootstrap the second node to the first (i.e. overwrite node 2's state information with that from the rolled back node 1).
Created ‎06-23-2016 10:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
bootstrapStandby means data from name node1 will be maitained in nam node 2 a well and eventually it picksup as main name node
Created ‎07-07-2016 08:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you all for the comments.
