【问题标题】:cassandra cqlsh <composed_ttl> errorcassandra cqlsh <composed_ttl> 错误
【发布时间】:2013-10-06 23:38:18
【问题描述】:

我正在使用 Mac 上的 CQL 3.1 文档手册学习 Cassandra CQL,并从自制软件安装了 cassandra(cqlsh 4.0.0 | Cassandra 2.0.0 | CQL 规范 3.1.0 | Thrift 协议 19.37.0)。从cqlsh,当我输入collections map example number 7:

UPDATE users USING TTL <computed_ttl> SET todo['2012-10-1'] = 'find water' WHERE user_id = 'frodo';

我收到此错误:

错误请求:第 1:22 行在输入 ' 处没有可行的替代方案

那么,文档是错误的还是我做错了什么?

【问题讨论】:

    标签: cassandra cql ttl


    【解决方案1】:

    您需要将&lt;computed_ttl&gt; 替换为实际的 TTL,例如

    UPDATE users USING TTL 100 SET todo['2012-10-1'] = 'find water' WHERE user_id = 'frodo';
    

    这将导致值在 100 秒后过期。

    【讨论】:

      猜你喜欢
      • 2017-12-29
      • 2018-01-05
      • 2013-10-17
      • 2017-09-13
      • 2016-01-14
      • 2020-10-05
      • 2015-10-20
      • 2015-03-02
      • 2020-01-13
      相关资源
      最近更新 更多