我试图了解Cassandra压力工具,但是这种行为很奇怪。
我有此个人资料:
keyspace: stressexample
keyspace_definition: |
CREATE KEYSPACE stressexample WITH REPLICATION = { 'class': 'SimpleStrategy', 'replication_factor': 1};
table: eventsrawtest
table_definition: |
CREATE TABLE eventsrawtest (
resid uuid,
time timestamp,
metric double,
PRIMARY KEY ((resid), time)
) WITH CLUSTERING ORDER BY (time DESC)
columnspec:
- name: resid
size: fixed(32) #In chars, no. of chars of UUID
population: uniform(1..100M)
- name: time
population: uniform(1..100M)
cluster: fixed(15)
insert:
partitions: fixed(10)
batchtype: UNLOGGED
select: fixed(15)/15
并使用以下配置运行测试:
cassandra-stress user profile=test.yaml no-warmup "ops(insert=1)" n=1 -rate threads=1 -node 127.0.0.1
我希望有10个分区,每个分区15行。但是我明白了:
select * from stressexample.eventsrawtest ;
resid | time | metric
--------------------------------------+---------------------------------+------------
00000000-0512-6937-0000-000005126937 | 1970-01-02 03:03:41.517000+0000 | 4.6976e+10
00000000-0512-6937-0000-000005126937 | 1970-01-02 01:22:07.196000+0000 | 9.0332e+09
00000000-0512-6937-0000-000005126937 | 1970-01-02 00:32:55.105000+0000 | 1.7804e+09
00000000-0512-6937-0000-000005126937 | 1970-01-02 00:27:32.042000+0000 | 8.5548e+10
00000000-0512-6937-0000-000005126937 | 1970-01-01 23:53:46.693000+0000 | 1.1229e+10
00000000-0512-6937-0000-000005126937 | 1970-01-01 23:27:46.510000+0000 | 8.9725e+10
00000000-0512-6937-0000-000005126937 | 1970-01-01 23:14:07.125000+0000 | 3.7946e+10
00000000-0512-6937-0000-000005126937 | 1970-01-01 14:55:37.189000+0000 | 2.6973e+10
00000000-0512-6937-0000-000005126937 | 1970-01-01 13:11:01.175000+0000 | 1.1714e+10
00000000-0512-6937-0000-000005126937 | 1970-01-01 11:16:05.654000+0000 | 4.0007e+10
00000000-0512-6937-0000-000005126937 | 1970-01-01 07:24:14.985000+0000 | 6.3887e+10
00000000-0512-6937-0000-000005126937 | 1970-01-01 06:39:09.031000+0000 | 2.3443e+10
00000000-0512-6937-0000-000005126937 | 1970-01-01 04:08:21.649000+0000 | 1.3024e+09
00000000-0512-6937-0000-000005126937 | 1970-01-01 03:36:13.938000+0000 | 2.6388e+10
00000000-0512-6937-0000-000005126937 | 1970-01-01 00:55:08.807000+0000 | 4.6217e+10
我还尝试放置分区:fixed(1)和ops(insert = 10),但没有任何变化。我在做错什么吗?
谢谢。