简体   繁体   English

Cassandra:Linux和Windows兼容吗?

[英]Cassandra: Is Linux and Windows compatible?

At the moment, I am using a Cassandra database on a Windows 7 system. 目前,我在Windows 7系统上使用Cassandra数据库。 We'd like to use Cassandra on Linux now and wonder if it's possible to migrate the data with a simple copy of the data directory from Windows to Linux? 我们现在想在Linux上使用Cassandra,并想知道是否可以将数据目录的简单副本从Windows迁移到Linux?

Can someone tell me if that's possible, meaning if the Windows data structure on the file system and Linux file structure are compatible? 有人可以告诉我这是否可能,这意味着文件系统和Linux文件结构上的Windows数据结构是否兼容?

If not, what'ts the best way to migrate a keyspace or the whole database from Windows to Linux? 如果没有,那么将密钥空间或整个数据库从Windows迁移到Linux的最佳方法是什么?

The storage format does not change between windows and linux, in theory copying the sstables over should work but not testing it would be a tragic mistake as I don't know if anyone has ever done it before. 存储格式在windows和linux之间没有变化,理论上复制sstables应该可以工作但不测试它将是一个悲剧性的错误,因为我不知道是否有人曾经做过它。 Test it out throughly! 彻底测试它! but it should work as far as I know. 但据我所知它应该有用。 (ensure that token ranges match up or you will lose data) (确保令牌范围匹配或您将丢失数据)

Couple other options: 结合其他选择:

  • Just replace windows hosts with linux ones, one at a time (or if wanna be aggressive 1 per replicas). 只需将Linux主机替换为linux主机,一次一个(或者如果每个副本需要激进1个)。 Then let bootstrapping process manage it. 然后让bootstrapping进程管理它。

  • If you want you can add a new DC with linux nodes, increase replication to include it in it (make sure app is using LOCAL_QUORUM not QUORUM and set to your Windows DC as local) then switch app to use other DC after repair, but beware of potential consistency issues during the switch. 如果你想要你可以添加一个新的DC与Linux节点,增加复制,将其包含在其中(确保应用程序使用LOCAL_QUORUM而不是QUORUM并设置为Windows DC作为本地)然后切换应用程序修复后使用其他DC,但要注意切换期间潜在的一致性问题。 To avoid issues with consistencies at cost of a bit more complexity, do writes at EACH_QUORUM and dont do switch until youve completed a repair cycle to cover all things written to just the one DC. 为了避免以一致性为代价的一致性问题,请在EACH_QUORUM上进行写操作,并且在完成修复周期以覆盖写入一个DC的所有内容之前不要切换。 then switch, then remove the Windows DC and decomission. 然后切换,然后删除Windows DC和decomission。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM