NodeVersionUpgrader.UpgraderMetadata annotation
The NodeVersionUpgrader.UpgraderMetadata annotation on the upgrader class specifies the version and the previousUpgrader attributes, both of which are required.
For example, the following is the @NodeVersionUpgrader.UpgraderMetadata annotation for version 2 of a Custom node:
@NodeVersionUpgrader.UpgraderMetadata(version = 2, previousUpgrader = NoUpgrades.class)
Previous Upgrader
The previousUpgrader attribute specifies the class name of the previous upgrader:
-
If this annotation is for the node’s first upgrader (upgrading from version 1 to version 2), set
previousUpgrader = NoUpgrades.classto signify there isn’t a previous upgrader. -
If this annotation is for a subsequent upgrader (for example, upgrading from version 2 to version 3), set
previousUpgraderto the class name of theupgraderfor the previous node version.For example, if this annotation is for an upgrade from version 2 to version 3, specify the name of the
upgraderclass for the version 2 node.