如何校准卡桑德拉应力图选项?

时间:2019-04-16 12:58:46

标签: database graph cassandra cassandra-stress

我设法在集群外部运行压力工具。 我已经准备好在我的cassa集群的bank键空间中使用基本表bank_transactions。

bank.bank_transactions(     客户编号文字,     年int     月int,     id timeuuid,     整数,     卡片文字     状态文字,     主键((客户编号,年份,月份),ID) ); 这是我的个人资料yaml文件:

length

我压力很大

table: bank_transactions

columnspec:
  - name: customerid
    size: uniform(5..10)
    population: uniform(1..10)
  - name: year
    size: fixed(4)
  - name: month
    size: fixed(2)
  - name: timeuuid
    cluster: uniform(20..40)
  - name: amount
    size: uniform(0..1000000)
  - name: text
    size: uniform(10..15)
  - name: status
    size: uniform(10..20)

insert:
    # How many partition to insert per batch
  partitions: fixed(2)
    # How many rows to update per partition
  select: fixed(1)/500
    # UNLOGGED or LOGGED batch for insert
  batchtype: UNLOGGED

queries:
   customer:
      cql: select *  from bank_transactions where customerid = ? and year = ? and month = ? and id = ?
      fields: multirow
#com.datastax.driver.core.exceptions.InvalidQueryException: 
#Partition key parts: year, month, id, customerid must be restricted as other parts are
   transactions:
      cql: select customerid, amount, card, status, id from bank_transactions where id = ? and customerid = ? and year = ? and month = ? 
      fields: samerow
   regularupdate:
      cql: update bank_transactions set amount = ? where customerid = ? and year = ? and month = ? and id = ?
      fields: samerow
#nestihalo se v casovem limitu, lze navysit pamet, casovy limit...      
#   updatewithlwt:
#      cql: update bank_transactions set amount = ? where customerid = ? and year = ? and month = ? and id = ? IF status = ?
#      fields: samerow

我希望cassandra.apache网站上有类似图形的内容 exapmle stress graph

但是结果确实很奇怪: my stress graph result

您能帮我吗,出了什么问题?

P.S。不要介意发行等等,这只是游乐场...

1 个答案:

答案 0 :(得分:0)

在另一个播放时间之后,我设置n = 1000000(没有其他更改),结果要好得多。 test stress cassandra n=1000000

希望这可能对某人有所帮助;)