我正在使用 Cassandra 3.0.15v 并想使用 scylla 提供的 sstableloader 实用程序将我的数据移动到 scylla db 3.3.0v,我尝试了不同的方法,但我无法做到。
表架构是,
CREATE TABLE events.test (
"Id1" text,
"Id2" text,
"event" set<text>,
PRIMARY KEY ("Id1", "Id2")
)
WITH CLUSTERING ORDER BY ("Id2" ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
我遵循的步骤是,
在运行上面的命令时,它得到的响应是:
com.datastax.driver.core.exceptions.SyntaxError: line 1:75 : missing elements...
我无法理解我在这里做错了什么。因此,任何帮助将不胜感激。
刚刚使用 journalctl _COMM=scylla 找到这些日志
cql_server - exception while processing connection: std::system_error (error system:32, sendmsg: Broken pipe)
Apr 22 14:54:02 ip-1-0-4-100 scylla[1371]: [shard 0] cql_server - exception while processing connection: std::system_error (error system:32, sendmsg: Broken pipe)
Apr 22 14:54:02 ip-1-0-4-100 scylla[1371]: [shard 2] cql_server - exception while processing connection: std::system_error (error system:32, sendmsg: Broken pipe)
Apr 22 15:35:33 ip-1-0-4-100 scylla[1371]: [shard 3] cql_server - exception while processing connection: std::system_error (error system:32, sendmsg: Broken pipe)
lines 3484-3523/3523 (END)
最佳答案
Cassandra 和 Scylla 之间的表属性存在一些细微差别。这可能是导致错误的原因。它需要在您的架构中稍作更改
您是否尝试过按照 Cassandra 到 Scylla 迁移文档中的步骤操作?
https://docs.scylladb.com/operating-scylla/procedures/cassandra_to_scylla_migration_process/
特别注意文档底部的架构差异。还有限制和已知问题。
另一个很好的来源是这个关于迁移策略的博客(如果您愿意考虑除 sstableloader
之外的其他方法),还有一个指向该主题的网络研讨会的链接。
https://www.scylladb.com/2019/04/02/spark-file-transfer-and-more-strategies-for-migrating-data-to-and-from-a-cassandra-or-scylla-cluster/
祝你好运!
关于cassandra - scylla sstableloader 在将 sstables 从 cassandra 复制到 scylla 时出错?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61361140/