Cassandra Python 驱动程序 ReadTimeout

帕纳吉奥蒂斯·西马基斯

我正在尝试使用官方 python 驱动程序运行 cqlsh 查询:

>>> session.execute('select count(*) from cassandra_table')

我收到以下错误:

ReadTimeout: Error from server: code=1200 [Coordinator node timed out waiting for replica nodes' responses] message="Operation timed out - received only 0 responses." info={'received_responses': 0, 'required_responses': 1, 'consistency': 'LOCAL_ONE'}

我试图增加读取超时

尝试#1:

>>> session.default_timeout = 60.0
>>> session.execute('select count(*) from cassandra_table')

尝试#2:

>>> session.execute('select count(*) from cassandra_table', timeout=60.0)

两种方式都给了我相同的读取时间错误如何正确增加读取超时?

版本信息:

Cassandra   3.11.0.1900
Spark   2.0.2.6-de611f9
DSE               5.1.5
cassandra-driver 3.12.0
曼德拉恩克

在 cassandra 中,这count(*)是一项非常昂贵的操作,需要读取所有节点上的所有数据。鉴于它很容易count(*)适用于少量数据,但不适用于可能有行的情况。

DataStax 还有一篇关于计数的博客文章:https ://www.datastax.com/dev/blog/counting-keys-in-cassandra

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

python cql驱动程序-cassandra.ReadTimeout-“操作超时-仅收到1个响应。”

来自分类Dev

python cql驱动程序-cassandra.ReadTimeout-“操作超时-仅收到1个响应。”

来自分类Dev

在Docker中设置cassandra驱动程序(python)

来自分类Dev

Datastax Cassandra驱动程序(python)导入失败

来自分类Dev

cassandra python驱动程序绑定到int

来自分类Dev

Datastax Cassandra驱动程序(python)导入失败

来自分类Dev

cassandra python驱动程序绑定到int

来自分类Dev

Cassandra模型的CQL(datastax驱动程序:python)

来自分类Dev

Python Cassandra 驱动程序:插入期间的编码问题

来自分类Dev

DataStax Python Cassandra 驱动程序错误地发现本地主机上的 Cassandra

来自分类Dev

使用Python驱动程序检查Cassandra表中是否存在记录

来自分类Dev

有人让ssl使用Python Cassandra驱动程序和eventlet吗?

来自分类Dev

Cassandra 3.1 Python驱动程序“输入描述中没有可行的替代方法”

来自分类Dev

cqlsh和Python cassandra驱动程序中最大时间uuid的差异

来自分类Dev

使用准备好的语句时,Cassandra中的python驱动程序出现问题

来自分类Dev

DS201:使用Python驱动程序插入cassandra时,如何获取“ timeuuid类型”的值?

来自分类Dev

使用Python驱动程序检查Cassandra表中是否存在记录

来自分类Dev

cassandra python 驱动程序自动降级 protocol_version 不起作用

来自分类Dev

Cassandra CQL驱动程序实现

来自分类Dev

Cassandra Java驱动程序UDT映射

来自分类Dev

Datastax Cassandra驱动程序引发CodecNotFoundException

来自分类Dev

Cassandra Java驱动程序连接错误

来自分类Dev

Python 网络驱动程序

来自分类Dev

TypeError:使用UDT集创建Cassandra Python驱动程序模型时,无法散列的类型UserType

来自分类Dev

cassandra datastax驱动程序抛出的写入超时

来自分类Dev

NoClassDefFoundError-Cassandra的datastax Java驱动程序

来自分类Dev

Cassandra DataStax驱动程序:如何分页浏览

来自分类Dev

如何使用Eclipse设置Cassandra Java驱动程序

来自分类Dev

使用datastax cassandra驱动程序3.0运行描述架构

Related 相关文章

  1. 1

    python cql驱动程序-cassandra.ReadTimeout-“操作超时-仅收到1个响应。”

  2. 2

    python cql驱动程序-cassandra.ReadTimeout-“操作超时-仅收到1个响应。”

  3. 3

    在Docker中设置cassandra驱动程序(python)

  4. 4

    Datastax Cassandra驱动程序(python)导入失败

  5. 5

    cassandra python驱动程序绑定到int

  6. 6

    Datastax Cassandra驱动程序(python)导入失败

  7. 7

    cassandra python驱动程序绑定到int

  8. 8

    Cassandra模型的CQL(datastax驱动程序:python)

  9. 9

    Python Cassandra 驱动程序:插入期间的编码问题

  10. 10

    DataStax Python Cassandra 驱动程序错误地发现本地主机上的 Cassandra

  11. 11

    使用Python驱动程序检查Cassandra表中是否存在记录

  12. 12

    有人让ssl使用Python Cassandra驱动程序和eventlet吗?

  13. 13

    Cassandra 3.1 Python驱动程序“输入描述中没有可行的替代方法”

  14. 14

    cqlsh和Python cassandra驱动程序中最大时间uuid的差异

  15. 15

    使用准备好的语句时,Cassandra中的python驱动程序出现问题

  16. 16

    DS201:使用Python驱动程序插入cassandra时,如何获取“ timeuuid类型”的值?

  17. 17

    使用Python驱动程序检查Cassandra表中是否存在记录

  18. 18

    cassandra python 驱动程序自动降级 protocol_version 不起作用

  19. 19

    Cassandra CQL驱动程序实现

  20. 20

    Cassandra Java驱动程序UDT映射

  21. 21

    Datastax Cassandra驱动程序引发CodecNotFoundException

  22. 22

    Cassandra Java驱动程序连接错误

  23. 23

    Python 网络驱动程序

  24. 24

    TypeError:使用UDT集创建Cassandra Python驱动程序模型时,无法散列的类型UserType

  25. 25

    cassandra datastax驱动程序抛出的写入超时

  26. 26

    NoClassDefFoundError-Cassandra的datastax Java驱动程序

  27. 27

    Cassandra DataStax驱动程序:如何分页浏览

  28. 28

    如何使用Eclipse设置Cassandra Java驱动程序

  29. 29

    使用datastax cassandra驱动程序3.0运行描述架构

热门标签

归档