@Beta
public interface UpgradeAdminService
Upgrades are performed in three phases:
initialize
- Initializes an upgradeupgrade
- Performs an upgrade, transferring device mastership from the current version to the
upgraded versioncommit
or rollback
- Completes or rolls back an upgrade, transferring mastership back
to nodes running the previous versionModifier and Type | Method and Description |
---|---|
void |
commit()
Commits an upgrade.
|
void |
initialize()
Initializes an upgrade.
|
void |
reset()
Resets an upgrade.
|
void |
rollback()
Rolls back an upgrade.
|
void |
upgrade()
Performs an upgrade, transferring device mastership to upgraded nodes.
|
void initialize()
This method must be called to initialize an upgrade and prior to physically upgrading any nodes.
java.lang.IllegalStateException
- if an upgrade is already in progressvoid upgrade()
This method transfers mastership from the current version of the software to the upgraded version. Thus, a subset of the nodes in the cluster must have been physically upgraded and restarted prior to executing this phase of the upgrade protocol.
java.lang.IllegalStateException
- if no upgrade has been initializedvoid commit()
Completes the upgrade process, committing the new cluster version.
java.lang.IllegalStateException
- if no upgrade is in progress or not all nodes have been upgradedvoid rollback()
When an upgrade is rolled back, mastership is transferred from upgraded nodes back to nodes running the version of the software prior to the upgrade.
java.lang.IllegalStateException
- if no upgrade is in progressvoid reset()
When an upgrade is rolled back, once nodes have been restored to the previos version the upgrade must be reset
to restore the upgrade state to Upgrade.Status.INACTIVE
.
java.lang.IllegalStateException
- if nodes have not been restored to the previous state