【问题标题】:Upgrading Cassandra from 2.0 to 2.1将 Cassandra 从 2.0 升级到 2.1
【发布时间】:2014-10-16 22:53:07
【问题描述】:
  1. 我将 Cassandra 2.0.9 升级到 2.1

将 Cassandra 从 2.0.9 升级到 2.1 后,对索引的查询不起作用。 我缺少的任何东西。

对主键的查询有效 例如。 select userid,name from user where userid='lll';

我已经对“名称”进行了索引,如果我查询 select userid,name from user where name='abc';不工作。 这在升级之前有效。

【问题讨论】:

  • Datastax 升级指南中指定的过程!!

标签: cassandra


【解决方案1】:

你跑nodetool upgradesstables了吗?按照DataStax Upgrade Guide 中给出的步骤进行,这是最常被遗忘的步骤。

否则,您可以通过nodetool重建每个索引。

nodetool rebuild_index MyKeyspaceName MyColumnFamilyName MyIndexName

你的索引应该在那之后工作,但这会消耗 I/O 和 CPU,所以它应该是最后的手段。一定要先运行 upgradesstables。

【讨论】:

  • 是的,我做了 nodetool upgradesstables。我写了一个 cql 脚本来 DROP INDEX 并重新创建 INDEX。这行得通。
  • 我按照你上面提到的做了,它奏效了。哪种方法好 a) nodetool rebuild_index MyKeyspaceName MyColumnFamilyName MyIndexName OR b) 使用 CQL 脚本 DROP index 然后 CREATE index ?
猜你喜欢
  • 2023-03-30
  • 2017-07-23
  • 2017-06-24
  • 2016-02-12
  • 1970-01-01
  • 2018-08-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多