Cassandra 从 2.0.x 升级到 2.1.x 或 3.0.x [英] Cassandra upgrade from 2.0.x to 2.1.x or 3.0.x

查看:29
本文介绍了Cassandra 从 2.0.x 升级到 2.1.x 或 3.0.x的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经搜索过这个问题的先前版本,但似乎没有一个适合我的情况.我有一个运行 2.0.x 的现有 Cassandra 集群.我被分配了新的虚拟机,所以我不想升级我现有的 Cassandra 节点 - 我想迁移到 a) 新虚拟机和 b) Cassandra 的更新版本.

I've searched for previous versions of this question, but none seem to fit my case. I have an existing Cassandra cluster running 2.0.x. I've been allocated new VMs, so I do NOT want to upgrade my existing Cassandra nodes - rather I want to migrate to a) new VMs and b) a more current version of Cassandra.

  1. 我知道就地升级,我会先升级到最新的 2.0.x,然后再升级到最新的 2.1.x.AFAIK,这里没有 SSTable 不一致.如果我通过添加新节点走这条路线,我假设我会按照 datastax 说明添加新节点/停用旧节点?

  1. I know for in-place upgrades, I would upgrade to the latest 2.0.x, then to the latest 2.1.x. AFAIK, there's no SSTable inconsistency here. If I go this route via addition of new nodes, I assume I would follow the datastax instructions for adding new nodes/decommissioning old nodes?

鉴于上述情况,是否可以从 2.0.x 移动到 3.0.x?我知道 SSTable 格式不同;但是,如果我添加新节点(而不是在磁盘上重新使用 SSTables),这有关系吗?

Given the above, is it possible to move from 2.0.x to 3.0.x? I know the SSTable format is different; however, if I'm adding new nodes (rather than re-using SSTables on disk), does this matter?

在我看来,#2 必须工作 - 否则,这意味着任何需要 SSTable 升级的升级都需要所有节点同时脱机;否则,有时会在同一集群中混合运行 2.x.x 和 3.0.x 版本.

It seems to me that #2 has to work - otherwise, it implies that any upgrade requiring SSTable upgrades would require all nodes to be taken offline simultaneously; otherwise, there would be mixed 2.x.x and 3.0.x versions running in the same cluster at some point.

我完全错了吗?有没有人有这样做的经验?

Am I completely wrong? Does anyone have any experience doing this?

推荐答案

不要担心迁移.您可以简单地将 Cassandra 2.0.X 集群迁移到 Cassandra 3.0.X.但是,如果您将集群 Cassandra 2.0.X 迁移到最新的 Cassandra 2.X.X,然后再迁移到 Cassandra 3.0.X,那就更好了.您需要遵循一些步骤-

Don't worry about the migration. You can simply migrate your Cassandra 2.0.X cluster to Cassandra 3.0.X. But its better if you migrate your cluster Cassandra 2.0.X to latest Cassandra 2.X.X then Cassandra 3.0.X. You need to follow some steps-

  1. 备份数据
  2. 卸载当前版本
  3. 安装您要升级的版本
  4. 恢复数据

在进行迁移时,您需要始终小心处理您的数据.对于数据备份和恢复,您可以通过两种方式-

As you are doing migration, you need to be careful about your data always. For the data backup and restore you can follow two ways-

  1. 创建 sstable 的快照,然后在安装新版本的 cassandra 后,将文件放置到数据位置并运行 sstableloader.
  2. 将您的架构备份到 .cql 文件并将所有表复制到 .csv,然后在安装新版本的 cassandra 后,从 获取您的架构.cql 并复制每个 .csv 文件中的所有表格.
  1. Creating snapshots of your sstables and then after installing the new version of cassandra, placing the files to the data location and run sstableloader.
  2. Backup your schema's to a .cql file and copy all the tables to .csv and then after installing the new version of cassandra, source your schema from .cql and copy all the tables from every single .csv file.

如果您完全相信您将如何完成迁移,那么您可以编写一个 bash 脚本来完成备份和恢复步骤.

If you are fully convinced how you will complete the migration then you can write a bash script to complete the backup and restore steps.

这篇关于Cassandra 从 2.0.x 升级到 2.1.x 或 3.0.x的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆