Coordinator node timed out on Cassandra cqlsh shell -


i new cassandra , trying multi node setup on 2 mac machine. not datastax casandra. ip 10.100.1.12 , other machine ip 10.100.1.15. have changed following properties in cassandra.yaml files on bothe machine:

10.100.1.15:

  • seeds: "127.0.0.1,10.100.1.12,10.100.1.15"
  • listen_address: 10.100.1.15
  • rpc_address: 10.100.1.15
  • endpoint_snitch: gossipingpropertyfilesnitch

10.100.1.12:

  • seeds: "127.0.0.1,10.100.1.12,10.100.1.15"
  • listen_address: 10.100.1.12
  • rpc_address: 10.100.1.12
  • endpoint_snitch: gossipingpropertyfilesnitch

    cassandra runs fine cqlsh opening using command bin/cqlsh 10.100.1.12

but when trying retrieve count of tables showing me error:

readtimeout: error server: code=1200 [coordinator node timed out waiting replica nodes' responses] message="operation timed out - received 0 responses." info={'received_responses': 0, 'required_responses': 1, 'consistency': 'one'}

i tried changing read_request_timeout_in_ms proprtty 5000 20000 still getting same error. please doing wrong?

the table schema following:

cqlsh:app_auditor> describe table traffic_data;  create table app_auditor.traffic_data (     current_time bigint primary key,     appid bigint,     attributes map<text, text>,     device bigint,     flow_type text,     message_time bigint ) bloom_filter_fp_chance = 0.01     , caching = {'keys': 'all', 'rows_per_partition': 'none'}     , comment = ''     , compaction = {'class': 'org.apache.cassandra.db.compaction.sizetieredcompactionstrategy', 'max_threshold': '32', 'min_threshold': '4'}     , compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.lz4compressor'}     , crc_check_chance = 1.0     , dclocal_read_repair_chance = 0.1     , default_time_to_live = 0     , gc_grace_seconds = 86400     , max_index_interval = 2048     , memtable_flush_period_in_ms = 0     , min_index_interval = 128     , read_repair_chance = 0.0     , speculative_retry = '99percentile'; 

the count query using select count(*) traffic_data;

in cassandra count(*) costly, cassandra needs scan row node give count, that's why it's giving timeout exception.

instead of using count(*) maintain counter table, below 1 :

create table traffic_counter (     type int primary key,     traffic_count counter ); 

when data insert traffic_data data, increment value of traffic_count

update traffic_counter set traffic_count = traffic_count + 1 type = 0; 

now can select traffic count efficiently.

select traffic_count traffic_counter type = 0; 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -