【问题标题】:What is the maximum size/number of lines of cassandra cqlsh_history and cli.history?cassandra cqlsh_history 和 cli.history 的最大大小/行数是多少?
【发布时间】:2018-05-28 11:08:40
【问题描述】:

我使用的是 cassandra 2.1.16 版。我已经验证 cli.history 文件最多包含 501 行。但是我没有看到 cqlsh_history 文件有限制。任何想法。

【问题讨论】:

    标签: cassandra cassandra-2.1


    【解决方案1】:

    cqlsh uses the readline Python module,并且没有设置历史长度。默认情况下,readlinedoes not limit the history file

    这假设您使用的是 CPython 2.7。如果你有不同的解释器,你可以检查默认使用

    python -c "import readline; print readline.get_history_length()"
    

    【讨论】:

    • 感谢您的澄清。我可以看到上面的api调用的值为-1,这表明历史是无限长的。
    • 令人惊讶的是,在 python 版本为 2.7.3 的窗口上,历史长度为 100,但是在 python 版本为 2.7.5 的 Linux 服务器上,历史长度为 -1 .. 根据我的理解,默认值值为 -1 ,但不确定我的本地窗口机器中的值为 100 。
    猜你喜欢
    • 2017-04-26
    • 1970-01-01
    • 2013-01-09
    • 1970-01-01
    • 2013-02-26
    • 2012-06-30
    • 2011-03-13
    • 1970-01-01
    • 2015-07-30
    相关资源
    最近更新 更多