从DSE 5.0.9迁移到Apache Cassandra 3.11.3的问题

时间:2018-12-10 11:02:48

标签: cassandra

我们正在考虑从DSE 5.0.9迁移到Apache Cassandra 3.11.3。我们已经走了很长一段距离,并且设法解决了各种问题(包括EverywhereStrategy一个问题),但是却遇到了system.local表问题。

到目前为止,迁移/升级仅在一台服务器上完成。在此节点上启动Cassandra 3.11.3时,加载system.local时出现错误:

INFO [main] 2018-12-07 10:56:12,963 ColumnFamilyStore.java:411 - Initializing system.local
INFO [SSTableBatchOpen:1] 2018-12-07 10:56:12,993 BufferPool.java:230 - Global buffer pool is enabled, when pool is exhausted (max is 512.000MiB) it will allocate on heap
ERROR [SSTableBatchOpen:1] 2018-12-07 10:56:13,013 DebuggableThreadPoolExecutor.java:239 - Error in ThreadPoolExecutor
java.lang.RuntimeException: Unknown column server_id during deserialization
at org.apache.cassandra.db.SerializationHeader$Component.toHeader(SerializationHeader.java:321) ~[apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.io.sstable.format.SSTableReader.open(SSTableReader.java:522) ~[apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.io.sstable.format.SSTableReader.open(SSTableReader.java:385) ~[apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.io.sstable.format.SSTableReader$3.run(SSTableReader.java:570) ~[apache-cassandra-3.11.3.jar:3.11.3]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_172]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_172]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_172]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_172]
at org.apache.cassandra.concurrent.NamedThreadFactory.lambda$threadLocalDeallocator$0(NamedThreadFactory.java:81) [apache-cassandra-3.11.3.jar:3.11.3]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_172]

再看我们在这里的另一个Cassandra 3.11.3集群,表中不存在system_id。但是,在表的DSE 5.0.9版本中确实如此。 无法加载system.local,我们最终收到以下警告:

WARN [main] 2018-12-06 10:43:57,241 SystemKeyspace.java:1087 - No host ID found, created a0bb8c11-2864-4d58-9c0c-59b97b16c48e (Note: This should happen exactly once per node).

(没有主机ID,因为system.local未加载) 然后导致以下错误:

ERROR [main] 2018-12-06 10:43:58,295 CassandraDaemon.java:708 - Exception encountered during startup
java.lang.RuntimeException: A node with address dubdc1-oatjeeramp2dmcassandra-04/10.109.158.254 already exists, cancelling join. Use cassandra.replace_address if you want to replace this node.
at org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:558) ~[apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:804) ~[apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:664) ~[apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:613) ~[apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:379) [apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:602) [apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:691) [apache-cassandra-3.11.3.jar:3.11.3]

这时,system.local已被覆盖,新的主机ID值已存储,Cassandra已关闭。

在cassandra-env.sh中添加-Dcassandra.replace_node=<ip address>会导致错误,表明该节点已经被引导,因此无法使用。我知道我可以通过删除所有数据来解决此问题,但是我真的不想这样做。

恢复system.local的备份将使我们能够再次启动DSE。当前该节点重新运行DSE5.0.9

以前有没有人看过这个问题,您对如何解决这个问题有任何建议吗?

1 个答案:

答案 0 :(得分:2)

步骤:

  1. 从DSE复制到OSS C *的确切可用配置。
  2. 更改了几个键空间/表:

    更改具有复制= {'class':'NetworkTopologyStrategy','DC3':'3'}的密钥空间dse_system; // DC1,DC2 = OSS C *

    //如果使用的是spark 使用紧缩= {'class':'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy','max_threshold':'32','min_threshold':'4'}更改表cfs_archive.sblocks;

    变更表cfs.sblocks,其压缩= {'class':'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy','max_threshold':'32','min_threshold':'4'};

  3. auto_bootstrap:false        JVM_OPTS =“ $ JVM_OPTS -Dcassandra.allow_unsafe_replace = true”        JVM_OPTS =“ $ JVM_OPTS -Dcassandra.replace_address = ...

请小心,在较低的环境中测试所有内容。 请通过此链接获取更多信息: https://www.mail-archive.com/user@cassandra.apache.org/msg58077.html