Upgrades: Rolling Upgrade, Downgrade and Version Migration

Big Data and Hadoop Administrator 16 min min read Updated: Nov 17, 2026 Advanced
Upgrades: Rolling Upgrade, Downgrade and Version Migration
Advanced Topic 3 of 4

Release Landscape

Apache Hadoop releases come as lines, for example 3.4.x and 3.5.x. The 3.5.0 release appeared in April 2026 and the 3.4 line still receives patch releases. Choose a version supported by all the other tools you run (Hive, Spark, HBase, Kafka clients, Ranger). Check each project's compatibility notes.

Upgrade typeExampleRisk
Patch (maintenance)3.4.1 -> 3.4.3Low
Minor3.4.x -> 3.5.0Medium
Major2.x -> 3.xHigh, plan carefully

Planning Checklist

  1. Read the release notes, incompatible changes and upgrade notes of every version between yours and the target
  2. Check Java version, OS, library and third-party compatibility
  3. Build a test cluster with a copy of real configs and sample data
  4. Upgrade the test cluster, run your real jobs, benchmark
  5. Create a written plan: order, timing, who, communication, rollback
  6. Take backups: fsimage, metastore DB, configs, Ranger DB
  7. Pick a low traffic window and notify users
  8. Execute, verify, finalize

HDFS Rolling Upgrade (HA Cluster)

A rolling upgrade updates daemons one at a time with the cluster running. It requires NameNode HA.

text Order: JournalNodes -> Standby NameNode -> failover -> old Active NameNode -> DataNodes in batches -> ZKFC with its NameNode Rack-by-rack for DataNodes: upgrade one rack at a time so replicas stay available
bash # 1. prepare: creates a rollback fsimage hdfs dfsadmin -rollingUpgrade prepare hdfs dfsadmin -rollingUpgrade query # wait until "Proceed with rolling upgrade" # 2. upgrade the STANDBY NameNode (nn2) hdfs --daemon stop namenode # on nn2; install new binaries; update symlink hdfs --daemon start namenode -rollingUpgrade started hdfs haadmin -failover nn1 nn2 # nn2 (new version) becomes active # repeat for nn1 (now standby) with the same start option # 3. upgrade DataNodes in batches hdfs dfsadmin -shutdownDatanode worker1:9867 upgrade hdfs dfsadmin -getDatanodeInfo worker1:9867 # fails once the node is down # install new binaries and start the DataNode again, wait until it re-registers, then next batch # 4. when everything runs the new version and tests pass hdfs dfsadmin -rollingUpgrade finalize
Until you finalize, rollback is possible; after finalize it is not: Run the new version for a few days of validation before finalize if your policy allows. Finalizing frees the old block files kept on DataNodes, so capacity usage temporarily goes up during the upgrade window.

Rollback and Downgrade

SituationOption
Problem found before finalize-rollingUpgrade downgrade (keeps data created after) or full rollback to the saved image (loses changes since prepare)
After finalizeRestore from backup. Plan so you do not need this
bash # Downgrade: restart daemons on the old version with hdfs --daemon start namenode -rollingUpgrade downgrade # Rollback: stop everything, start old version with hdfs --daemon start namenode -rollingUpgrade rollback

YARN and Others

  • ResourceManager: upgrade standby, failover, upgrade the other. Work-preserving recovery keeps jobs running
  • NodeManagers: restart in batches with yarn rmadmin -refreshNodes -g graceful drain, or let work-preserving NM restart keep containers
  • Clients, edge nodes, Spark/Hive jars: align versions of client libraries last
  • Hive, HBase, Kafka, ZooKeeper: follow their own rolling procedures. Take metastore DB backup and run schematool -upgradeSchema
xml <!-- NodeManager restart without losing containers --> <property><name>yarn.nodemanager.recovery.enabled</name><value>true</value></property> <property><name>yarn.nodemanager.recovery.dir</name><value>/var/lib/hadoop-yarn/nm-recovery</value></property> <property><name>yarn.nodemanager.address</name><value>0.0.0.0:45454</value></property> <!-- fixed port is required -->

Express Upgrade (With Downtime)

For non-HA clusters or major changes, stop the cluster, upgrade software everywhere, start the NameNode with -upgrade, wait for DataNodes to upgrade their storage, validate and then hdfs dfsadmin -finalizeUpgrade.

bash hdfs --daemon start namenode -upgrade hdfs dfsadmin -upgradeProgress status # (Hadoop 2 style) or check logs/UI hdfs dfsadmin -finalizeUpgrade

Validation After Upgrade

  • hdfs fsck / is healthy, no new missing blocks
  • All daemons on the expected version: hadoop version, UI footer, hdfs dfsadmin -report version fields
  • Run TestDFSIO and the standard sample jobs
  • Run a set of real pipelines end to end
  • Compare performance and error rates with the baseline
  • Check security: Kerberos login, Ranger enforcement, TLS
Never mix many changes: Do not upgrade Hadoop, change Java and migrate OS in one weekend. Separate changes so a problem has one possible cause.

Conclusion

Plan upgrades from release notes and compatibility, test on a lab, back up, then upgrade rolling in the right order with prepare and finalize, keep rollback until you are sure, and validate with real workloads.

Quick Summary: backup -> prepare -> standby NN -> failover -> DataNodes in batches -> validate -> finalize.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators