我正在尝试使用官方 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