【问题标题】:How do I define multiple table definitions and multiple column specs for cassandra-stress profile file?如何为 cassandra-stress 配置文件定义多个表定义和多个列规范?
【发布时间】:2016-04-25 16:13:01
【问题描述】:
# Keyspace Name
keyspace: demo1

# The CQL for creating a keyspace (optional if it already exists)
keyspace_definition: |
  CREATE KEYSPACE demo1;
# Table name
table: sample_test

# The CQL for creating a table you wish to stress (optional if it already exists)
table_definition: |
    CREATE TABLE sample_test (
        key1 blob PRIMARY KEY,
        value1 blob
    )

### Column Distribution Specifications ###

columnspec:
  - name: hash
    size: fixed(96)       #domain names are relatively short

  - name: body
    size: gaussian(100..300)    #the body of the blog post can be long
    population: uniform(1..10M)  #10M possible domains to pick from

现在如何在同一个键空间中定义另一个表?所有示例都只讨论定义一个表。我还尝试像上面一样定义另一个表定义及其列规范,但随后出现以下错误“com.datastax.driver.core.exceptions.InvalidQueryException: Batch too large”

【问题讨论】:

    标签: cassandra cassandra-2.1 cassandra-stress


    【解决方案1】:

    很遗憾,你不能。一个压力配置文件只能包含一个table_definition,并且它只能定义一个表。它甚至验证只有一个定义匹配table 声明。您可以尝试同时运行压力工具的两个实例来获得该行为,这很不方便,但我认为这是唯一可用的解决方法,而不是编写自己的基准测试(这很棘手)。

    【讨论】:

      【解决方案2】:

      这个问题已在 Cassandra https://issues.apache.org/jira/browse/CASSANDRA-8780 上提出

      它已被修复,但只会与 Cassandra 的下一个主要版本 (4.0) 一起发布。

      【讨论】:

        猜你喜欢
        • 2014-06-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-11-03
        • 1970-01-01
        • 1970-01-01
        • 2012-04-30
        相关资源
        最近更新 更多