Created 06-23-2016 12:02 AM
In HDFS documentation, it said the steps to do rollback of rolling upgrade:
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
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
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
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
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
Thank you all for the comments.