Skip to content

Commit b24c25f

Browse files
committed
Add note on downgrades
1 parent 49cf9d9 commit b24c25f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/modules/hdfs/pages/usage-guide/upgrading.adoc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@ IMPORTANT: HDFS upgrades are experimental, and details may change at any time
44

55
HDFS currently requires a manual process to upgrade. This guide will take you through an example case, upgrading an example cluster (from our xref:getting_started/index.adoc[Getting Started] guide) from HDFS 3.3.6 to 3.4.0.
66

7+
== Preparing for the worst
8+
9+
Upgrades can fail, and it is important to prepare for when that happens. Apache HDFS supports https://hadoop.apache.org/docs/r3.4.0/hadoop-project-dist/hadoop-hdfs/HdfsRollingUpgrade.html#Downgrade_and_Rollback[two ways to revert an upgrade]:
10+
11+
Rollback:: Reverts all user data to the pre-upgrade state. Requires taking the cluster offline.
12+
Downgrade:: Downgrades the HDFS software but preserves all changes made by users. Can be performed as a rolling change, keeping the cluster online.
13+
14+
The Stackable Operator for HDFS supports downgrading but not rollbacks.
15+
16+
In order to downgrade, revert the `.spec.image.productVersion` field, and then proceed to xref:#finalize[finalizing] once the cluster is downgraded:
17+
18+
[source,shell]
19+
----
20+
$ kubectl patch hdfs/simple-hdfs --patch '{"spec": {"image": {"productVersion": "3.3.6"}}}' --type=merge
21+
hdfscluster.hdfs.stackable.tech/simple-hdfs patched
22+
----
23+
24+
WARNING: The Stackable Operator for HDFS will _not_ currently roll downgrades in order, they will incur some downtime.
25+
726
== Preparing HDFS
827

928
HDFS must be configured to initiate the upgrade process. To do this, put the cluster into upgrade mode by running the following commands in an HDFS superuser environment
@@ -58,6 +77,7 @@ NOTE: This will automatically enable the NameNodes' compatibility mode, allowing
5877

5978
NOTE: Services will be upgraded in order: JournalNodes, then NameNodes, then DataNodes.
6079

80+
[#finalize]
6181
== Finalizing the upgrade
6282

6383
Once all HDFS pods are running the new version, the HDFS upgrade can be finalized (from the HDFS superuser environment as described in the preparation step):

0 commit comments

Comments
 (0)