使用配置文件时,Cassandra Stress工具不支持一致性级别

时间:2018-03-29 19:24:50

标签: cassandra datastax cassandra-3.0 cassandra-stress

我正在尝试使用cassandra-stress工具运行压力测试,该工具包含复制因子= 3的6节点群集上的配置文件。

./cassandra-stress user profile=/path/to/cassandra_stress.yaml duration=2h ops\(insert=20,select=10\) **cl=local_quorum** no-warmup -node nodeaddress -transport truststore=/path/to/tls/truststore.jks truststore-password=***** -rate threads=5 -log level=verbose file=/path/to/log -graph file=graph_.html title='Graph' & 2>1

执行在某个时刻停止,并带有ReadTimeout,日志显示如下:

  

com.datastax.driver.core.exceptions.WriteTimeoutException:写入查询时Cassandra超时一致性 LOCAL_QUORUM (需要2个副本,但只有1个确认写入)< / p>      

com.datastax.driver.core.exceptions.ReadTimeoutException:读取查询时Cassandra超时一致性 ALL (需要3个副本但只有2个确认读取)< / p>

我不确定为什么它会将cl=local_quorum用于写入而不用于读取。任何见解都会有所帮助。

配置文件

# Keyspace Name keyspace: d3 keyspace_definition: |   CREATE KEYSPACE d3 WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '3'} AND DURABLE_WRITES = true;


# Table name table: stress_offheap_long table_definition: |   CREATE TABLE d3.stress_offheap_long (
    dart_id timeuuid,
    dart_version_id timeuuid,
    account_id timeuuid,
    amount double,
    data text,
    state text, PRIMARY KEY (dart_id, dart_version_id)   ) WITH CLUSTERING ORDER BY (dart_version_id DESC)
    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 dclocal_read_repair_chance = 0.1
    AND default_time_to_live = 0
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.0
    AND speculative_retry = '99.0PERCENTILE';

columnspec:
  - name: dart_id
    size: gaussian(36..64)
    population: uniform(1..10M)

  - name: art_version_id
    size: gaussian(36..64)

  - name: account_id
    size: gaussian(36..64)
    population: uniform(1..10M)

  - name: amount
    size: fixed(1)

  - name: data
    size: gaussian(5000..20000)

  - name: state
    size: gaussian(1..2)
    population: fixed(1)

### Batch Ratio Distribution Specifications ###

insert:
  partitions: fixed(1)

  select:    fixed(1)/1000

  batchtype: UNLOGGED             # Unlogged batches


#
# A list of queries you wish to run against the schema
#
queries:
   select:
      cql: select * from stress_offheap_long where dart_id = ? and dart_version_id=? LIMIT 1
      fields: samerow

0 个答案:

没有答案