无法 运行 Cassandra-Stress

Unable to run Cassandra-Stress

我在 运行 cassandra-stress 命令

时遇到以下错误

./cassandra-stress user profile=/home/cass/apache-cassandra-3.11.2/tools/stress_test.yaml duration=1m "ops(insert=1,latest_event=1,events=1)"

我得到以下 errors/warnings:

WARN 18:28:41,488 You listed localhost/0:0:0:0:0:0:0:1:9042 in your contact points, but it wasn't found in the control host's system.peers at startup

Connected to cluster: Test Cluster, max pending requests per connection 128, max connections per host 8

Datatacenter: datacenter1; Host: localhost/127.0.0.1; Rack: rack1

Generating batches with [1..50] partitions and [0..50] rows (of [1..50] total rows in the partitions)

Sleeping 2s...

Warming up insert with 0 iterations... Warming up latest_event with 0 iterations...

java.lang.IllegalArgumentException: No query defined with name latest_event at org.apache.cassandra.stress.StressProfile.getQuery(StressProfile.java:362) at org.apache.cassandra.stress.settings.SettingsCommandUser.get(SettingsCommandUser.java:93) at org.apache.cassandra.stress.settings.SettingsCommandUser.get(SettingsCommandUser.java:82) at org.apache.cassandra.stress.operations.SampledOpDistributionFactory.get(SampledOpDistributionFactory.java:83) at org.apache.cassandra.stress.StressAction$Consumer.(StressAction.java:409) at org.apache.cassandra.stress.StressAction.run(StressAction.java:233) at org.apache.cassandra.stress.StressAction.warmup(StressAction.java:121) at org.apache.cassandra.stress.StressAction.run(StressAction.java:70) at org.apache.cassandra.stress.Stress.run(Stress.java:143) at org.apache.cassandra.stress.Stress.main(Stress.java:62)

这是我的 stress_test.yaml 文件的样子:

keyspace: hss_cass_2

table: equipment_status

insert: partitions: uniform(1..50)

batchtype: LOGGED

select: uniform(1..10)/10
queries:

simple1: cql: select * from equipment_status where equipment_id = ? and eq_status = ? LIMIT 100 fields: samerow

range1: cql: select * from equipment_status where equipment_id = ? and eq_status = ? and equipment_id_type = ? LIMIT 100 fields: multirow

此外,数据中心的名称是 dc1,但从错误日志中我发现给出的是 Datacenter: datacenter1。这可能是错误的事情之一,但我不知道。

阿帕奇卡桑德拉 3.11.2。 RHEL 6.5

您的 command-line 中有错误 - 您指定了 ops(insert=1,latest_event=1,events=1),但您没有名称为 latest_eventevents 的查询 - 根据您的文件只有查询 simple1range1 - 您需要在 ops 命令中指定它们...

以下博客文章可以提供有关如何使用它的更多信息:from the lastpickle, and this series from instaclustr: 1, 2, 3 (especially this) & on how to test multiple tables