Skip to content

Commit 77fec41

Browse files
Merge pull request #214297 from TheovanKraay/cassandra-mi-hybrid-updates
cassandra mi hybrid updates
2 parents 7284d1d + 8edf989 commit 77fec41

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

articles/managed-instance-apache-cassandra/configure-hybrid-cluster.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -225,27 +225,34 @@ The above instructions provide guidance for configuring a hybrid cluster. Howeve
225225
1. Temporarily disable automatic repairs in Azure Managed Instance for Apache Cassandra for the duration of the migration:
226226

227227
```azurecli-interactive
228-
az managed-cassandra cluster update --cluster-name --resource-group--repair-enabled false
228+
az managed-cassandra cluster update \
229+
--resource-group $resourceGroupName \
230+
--cluster-name $clusterName --repair-enabled false
229231
```
230232
231-
1. Run `nodetool repair --full` on each node in your existing cluster's data center. You should run this **only after all of the prior steps have been taken**. This should ensure that all historical data is replicated to your new data centers in Azure Managed Instance for Apache Cassandra. For most installations you can only run one or two in parallel to not overload the cluster. You can monitor a particular repair run by checking `nodetool netsats` and `nodetool compactionstats` against the specific node. If you have a very large amount of data in your existing cluster, it may be necessary to run the repairs at the keyspace or even table level - see [here](https://cassandra.apache.org/doc/latest/cassandra/operating/repair.html) for more details on running repairs in Cassandra.
233+
1. In Azure CLI, run the below command to execute `nodetool rebuild` on each node in your new Azure Managed Instance for Apache Cassandra data center, replacing `<ip address>` with the IP address of the node, and `<sourcedc>` with the name of your existing data center (the one you are migrating from):
232234
235+
```azurecli-interactive
236+
az managed-cassandra cluster invoke-command \
237+
--resource-group $resourceGroupName \
238+
--cluster-name $clusterName \
239+
--host <ip address> \
240+
--command-name nodetool --arguments rebuild="" "<sourcedc>"=""
241+
```
233242
243+
You should run this **only after all of the prior steps have been taken**. This should ensure that all historical data is replicated to your new data centers in Azure Managed Instance for Apache Cassandra. You can run rebuild on one or more nodes at the same time. Run on one node at a time to reduce the impact on the existing cluster. Run on multiple nodes when the cluster can handle the extra I/O and network pressure. For most installations you can only run one or two in parallel to not overload the cluster.
234244
235-
> [!NOTE]
236-
> To speed up repairs we advise (if system load permits it) to increase both stream throughput and compaction throughput as in the example below:
237-
>```azure-cli
238-
> az managed-cassandra cluster invoke-command --resource-group $resourceGroupName --cluster-name $clusterName --host $host --command-name nodetool --arguments "setstreamthroughput"="" "7000"=""
239-
>
240-
> az managed-cassandra cluster invoke-command --resource-group $resourceGroupName --cluster-name $clusterName --host $host --command-name nodetool --arguments "setcompactionthroughput"="" "960"=""
245+
> [!WARNING]
246+
> You must specify the source *data center* when running `nodetool rebuild`. If you provide the data center incorrectly on the first attempt, this will result in token ranges being copied, without data being copied for your non-system tables. Subsequent attempts will fail even if you provide the data center correctly. You can resolve this by deleting entries for each non-system keyspace in `system.available_ranges` via the `cqlsh` query tool in your target Cassandra MI data center:
247+
> ```shell
248+
> delete from system.available_ranges where keyspace_name = 'myKeyspace';
249+
> ```
241250
242251
1. Cut over your application code to point to the seed nodes in your new Azure Managed Instance for Apache Cassandra data center(s).
243252
244253
> [!IMPORTANT]
245254
> As also mentioned in the hybrid setup instructions, if the data center(s) in your existing cluster do not enforce [client-to-node encryption (SSL)](https://cassandra.apache.org/doc/3.11/cassandra/operating/security.html#client-to-node-encryption), you will need to enable this in your application code, as Cassandra Managed Instance enforces this.
246255
247-
1. Run nodetool repair **again** on all the nodes in your existing cluster's data center, in the same manner as in step 3 above (to ensure any deltas are replicated following application cut over).
248-
249256
1. Run ALTER KEYSPACE for each keyspace, in the same manner as done earlier, but now removing your old data center(s).
250257
251258
1. Run [nodetool decommission](https://cassandra.apache.org/doc/latest/cassandra/tools/nodetool/decommission.html) for each old data center node.
@@ -255,7 +262,9 @@ The above instructions provide guidance for configuring a hybrid cluster. Howeve
255262
1. Re-enable automatic repairs:
256263
257264
```azurecli-interactive
258-
az managed-cassandra cluster update --cluster-name --resource-group--repair-enabled true
265+
az managed-cassandra cluster update \
266+
--resource-group $resourceGroupName \
267+
--cluster-name $clusterName --repair-enabled true
259268
```
260269
261270
## Troubleshooting

0 commit comments

Comments
 (0)