此内容没有您所选择的语言版本。
16.2. Rolling Upgrades Using Hot Rod (Remote Client-Server Mode)
Important
- For JBoss Data Grid 6.1, use Hot Rod protocol version 1.2
- For JBoss Data Grid 6.2, use Hot Rod protocol version 1.3
This procedure assumes that a cluster is already configured and running, and that it is using an older version of JBoss Data Grid. This cluster is referred to below as the Source Cluster and the Target Cluster refers to the new cluster to which data will be migrated.
Begin a New Cluster (Target Cluster)
Start the Target Cluster with the new version of JBoss Data Grid.Use either different network settings or JGroups cluster name to avoid overlap with the Source Cluster.Configure the Target Cluster with a
RemoteCacheStore
The Target Cluster is configured with aRemoteCacheStore
with the following settings for each cache to be migrated:servers
must point to the Source Cluster.cache name
must coincide with the name of the cache on the Source Cluster.hotrod-wrapping
must be enabled ("true"
).purge
must be disabled ("false"
).passivation
must be disabled ("false"
).
Figure 16.1. Configure the Target Cluster with a RemoteCacheStore
Note
See the$JDG_HOME/server/docs/examples/configs/standalone-hotrod-rolling-upgrade.xml
file for a full example of the Target Cluster configuration for performing Rolling Upgrades.Target Cluster configuration example assumes the Source Cluster is running withstandalone.xml
configuration:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure clients to point to the Target Cluster
Configure clients to point to the Target Cluster instead of the Source Cluster, restarting each client node one by one.Eventually all requests will be handled by the Target Cluster, which will lazily load data from the Source Cluster on demand. The Source Cluster is now theRemoteCacheStore
for the Target Cluster.Figure 16.2. Clients point to the Target Cluster with the Source Cluster as
RemoteCacheStore
for the Target Cluster.Dump the Source Cluster keyset
When all connections are using the Target Cluster, the keyset on the Source Cluster must be dumped. This can be done using either JMX or the CLI:JMX
Invoke therecordKnownGlobalKeyset
operation on theRollingUpgradeManager
MBean on the Source Cluster for every cache that must be migrated.CLI
Invoke theupgrade --dumpkeys
command on the Source Cluster for every cache that must be migrated, or use the--all
switch to dump all caches in the cluster.
Fetch remaining data from the Source Cluster
The Target Cluster fetches all remaining data from the Source Cluster. Again, this can be done using either JMX or CLI:JMX
Invoke thesynchronizeData
operation and specify thehotrod
parameter on theRollingUpgradeManager
MBean on the Target Cluster for every cache that must be migrated.CLI
Invoke theupgrade --synchronize=hotrod
command on the Target Cluster for every cache that must be migrated, or use the--all
switch to synchronize all caches in the cluster.
Disabling the
RemoteCacheStore
Once the Target Cluster has obtained all data from the Source Cluster, theRemoteCacheStore
on the Target Cluster must be disabled. This can be done as follows:JMX
Invoke thedisconnectSource
operation specifying thehotrod
parameter on theRollingUpgradeManager
MBean on the Target Cluster.CLI
Invoke theupgrade --disconnectsource=hotrod
command on the Target Cluster.
- Decommission the Source Cluster.