Skip to content

Instantly share code, notes, and snippets.

@tcarland
Last active December 10, 2020 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tcarland/2bd78307ac689a92678801a9859d89ad to your computer and use it in GitHub Desktop.
Save tcarland/2bd78307ac689a92678801a9859d89ad to your computer and use it in GitHub Desktop.
Upgrading Hadoop v2 to v3

Hadoop v2 to v3

Stop all Application and Services other than HDFS

Run Fsck

hdfs fsck / -files -blocks -locations > dfs-fsck.log

Create Metadata Checkpoint

hdfs dfsadmin -safemode enter
hdfs dfsadmin -saveNamespace

Backup Checkpoint files

 ${dfs.namenode.name.dir}/current

Run dataNode Report

hdfs dfsadmin -report > dfs-report.log

Capture Namespace

hdfs dfs -ls -R / > dfs-lsr.log

Install new Hadoop Version..

Start Upgrade process

hadoop-daemon.sh start namenode -upgrade

Check status of upgrade

hadoop dfsadmin -upgradeProgress status

Finalize previous images

hdfs dfsadmin -finalizeUpgrade

Validate upgrade completes

hadoop dfsadmin -upgradeProgress status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment