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

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

问题描述

我已经搜索了该问题的早期版本,但似乎没有一个适合我的情况.我有一个运行2.0.x的现有Cassandra群集.我已经分配了新的VM,所以我不想升级现有的Cassandra节点-而是想迁移到a)新的VM和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集群迁移到Cassandra3.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天全站免登陆