cassandra - 如何为 cassandra-stress 配置文件定义多个表定义和多个列规范?

标签 cassandra cassandra-2.1 cassandra-stress

# 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:批处理太大”

最佳答案

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

关于cassandra - 如何为 cassandra-stress 配置文件定义多个表定义和多个列规范?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34889485/

相关文章:

python cassandra 驱动程序与副本具有相同的插入性能

cassandra - cassandra 中的自定义数据复制?

java - Cassandra-Java-driver : com. datastax.driver.core.exceptions.InvalidTypeException : Invalid type, 列是一个列表,但提供了类 java.lang.String

cassandra - 新接口(interface)方法 Cassandra::get_paged_slice 如何工作以及其目的是什么?

mongodb - 使用 mongodb 或 cassandra 的空间数据

cassandra - 替换种子节点而不将其从种子列表中删除

java - 通过 spring 配置的 Cassandra 查询日志记录

Cassandra压力工具身份验证

cassandra - Cassandra 压力测试