简体   繁体   English

一致性为ONE的读取查询期间的Cassandra超时

[英]Cassandra timeout during read query at consistency ONE

I have a problem with the cassandra db and hope somebody can help me. 我对cassandra db有问题,希望有人可以帮助我。 I have a table “log”. 我有一个表“ log”。 In the log table, I have inserted about 10000 rows. 在日志表中,我插入了大约10000行。 Everything works fine. 一切正常。 I can do a 我可以做一个

select * from

select count(*) from

As soon I insert 100000 rows with TTL 50, I receive a error with 一旦我用TTL 50插入100000行,就会收到错误消息

select count(*) from

Version: cassandra 2.1.8, 2 nodes 版本:cassandra 2.1.8,2个节点

Cassandra timeout during read query at consistency ONE (1 responses were required but only 0 replica responded) 一致性为ONE的读取查询期间的Cassandra超时(需要1个响应,但仅响应0个副本)

Has someone a idea what I am doing wrong? 有人知道我在做什么错吗?

CREATE TABLE test.log (
    day text,
    date timestamp,
    ip text,
    iid int,
    request text,
    src text,
    tid int,
    txt text,
    PRIMARY KEY (day, date, ip)
) WITH read_repair_chance = 0.0
   AND dclocal_read_repair_chance = 0.1
   AND gc_grace_seconds = 864000
   AND bloom_filter_fp_chance = 0.01
   AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' }
   AND comment = ''
   AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy' }
   AND compression = { 'sstable_compression' : 'org.apache.cassandra.io.compress.LZ4Compressor' }
   AND default_time_to_live = 0
   AND speculative_retry = '99.0PERCENTILE'
   AND min_index_interval = 128
   AND max_index_interval = 2048;

That error message indicates a problem with the READ operation. 该错误消息表明READ操作存在问题。 Most likely it is a READ timeout. 最有可能是读取超时。 You may need to update your Cassandra.yaml with a larger read timeout time as described in this SO answer . 您可能需要按照此SO回答中所述的更长的读取超时时间来更新Cassandra.yaml。

Example for 200 seconds: 200秒的示例:

read_request_timeout_in_ms: 200000

If updating that does not work you may need to tweak the JVM settings for Cassandra. 如果无法进行更新,则可能需要调整Cassandra的JVM设置。 See DataStax's " Tuning Java Ops " for more information 有关更多信息,请参见DataStax的“ 调整Java操作 ”。

count() is a very costly operation, imagine Cassandra need to scan all the row from all the node just to give you the count. count()是一个非常昂贵的操作,想象一下Cassandra需要扫描所有节点上的所有行,只是为了给您计数。 In small amount of rows if works, but on bigger data, you should use another approaches to avoid timeout. 如果行较少,但行数较大,则应使用另一种方法来避免超时。

Example of one of such queries: 此类查询之一的示例:

select day, date, ip, iid, request, src, tid, txt from test.log where day='Saturday' and date='2017-08-12 00:00:00' and ip='127.0 0.1' 从test.log中选择日期,日期,ip,iid,请求,src,tid,txt,其中day ='Saturday'和date ='2017-08-12 00:00:00'和ip ='127.0 0.1'

Remarks: 备注:

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 一致性 ONE/LOCAL_QUORUM 读取查询期间的 Cassandra 超时 - Cassandra timeout during read query at consistency ONE/LOCAL_QUORUM 读取查询期间Cassandra超时,一致性为LOCAL_ONE - Cassandra timeout during read query at consistency LOCAL_ONE Cassandra 在一致性 LOCAL_ONE 读取查询期间超时(等待修复不一致副本时超时) - Cassandra timeout during read query at consistency LOCAL_ONE (timeout while waiting for repair of inconsistent replica) 在一致性ONE的读取查询期间的Cassandra超时(需要1个响应但仅响应0个副本) - Cassandra timeout during read query at consistency ONE (1 responses were required but only 0 replica responded) Cassandra 服务器在一致性读取查询期间超时 ONE(0 个副本响应超过 1 个需要) - Cassandra Server timeout during read query at consistency ONE (0 replica(s) responded over 1 required) 停用节点时,在读取查询期间以一致性LOCAL_ONE获取Cassandra超时 - Getting Cassandra timeout during read query at consistency LOCAL_ONE while decommissioning a node 一致性 LOCAL_ONE 的 SIMPLE 写入查询期间的 Cassandra 超时 - Cassandra timeout during SIMPLE write query at consistency LOCAL_ONE 让 WriteTimeoutException 运行 cassandra-stress,“Cassandra 在写入查询期间超时,一致性为一” - Getting WriteTimeoutException running cassandra-stress, "Cassandra timeout during write query at consistency ONE" Cassandra 在一致性 LOCAL_QUORUM 的读取查询期间超时(需要 2 个响应,但只有 0 个副本响应) - Cassandra timeout during read query at consistency LOCAL_QUORUM (2 responses were required but only 0 replica responded) Cassandra查询在加载5m行数据后失败-在一致性为LOCAL_ONE的读取查询期间,Cassandra错误 - Cassandra Query fails after data load of 5m rows - Cassandra failure during read query at consistency LOCAL_ONE
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM