【问题标题】:Issue while migrating from Apache cassandra 3.11.4 to 4.0 beta version从 Apache cassandra 3.11.4 迁移到 4.0 beta 版本时出现问题
【发布时间】:2020-11-21 11:44:31
【问题描述】:

我在开发系统中将 cassandra 从 3.11.4 迁移到 4.0 测试版时遇到问题。

ERROR [main] 2020-07-31 15:34:36,099 CassandraDaemon.java:800 - Exception encountered during startup
java.lang.IllegalArgumentException: Compact Tables are not allowed in Cassandra starting with 4.0 version. Use `ALTER ... DROP COMPACT STORAGE` command supplied in 3.x/3.11 Cassandra in order to migrate off Compact Storage.
        at org.apache.cassandra.schema.SchemaKeyspace.fetchTable(SchemaKeyspace.java:960)
        at org.apache.cassandra.schema.SchemaKeyspace.fetchTables(SchemaKeyspace.java:919)
        at org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspace(SchemaKeyspace.java:878)
        at org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspacesWithout(SchemaKeyspace.java:869)
        at org.apache.cassandra.schema.SchemaKeyspace.fetchNonSystemKeyspaces(SchemaKeyspace.java:857)
        at org.apache.cassandra.schema.Schema.loadFromDisk(Schema.java:102)
        at org.apache.cassandra.schema.Schema.loadFromDisk(Schema.java:91)
        at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:241)
        at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:661)
        at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:778)

错误说要删除 COMPACT STORAGE ,但在我的数据库中没有启用 COMPACT STORAGE 的表。 请提出任何解决方案!

【问题讨论】:

    标签: cassandra cassandra-4.0


    【解决方案1】:

    正如例外情况所暗示的,您有一个或多个表仍在使用已弃用的 Thrift 存储格式,即使您对此一无所知。

    试试这个(粗略而简单的)命令:

    $ cqlsh <node_ip> -e "DESCRIBE FULL SCHEMA" | egrep "CREATE TABLE|COMPACT STORAGE"
    

    这将列出集群中的所有表,并指出它们中是否仍有紧凑存储支持。如果您启用了身份验证,则需要相应地对其进行修改以包含数据库凭据。干杯!

    【讨论】:

    • 谢谢@flightc!我错过了一些桌子。现在它正在工作
    猜你喜欢
    • 1970-01-01
    • 2019-05-11
    • 2020-09-23
    • 2017-01-07
    • 1970-01-01
    • 2018-07-25
    • 1970-01-01
    • 2014-02-13
    • 1970-01-01
    相关资源
    最近更新 更多