1

Cassandra-stress tool inserts data into the default keyspace Keyspace1. How can I insert into a specific keyspace?

Thanks Smitha

giampaolo
  • 6,906
  • 5
  • 45
  • 73

2 Answers2

4

The latest stress tool for cassandra 2.1 allows you to create your own schema and even comes with 3 example schemas, one of which called cqlstress-example.yaml. They can be found in C*-dir/tools/.

You can issue a stress command as follows:

./bin/cassandra-stress user profile=./cqlstress-example.yaml ops\(insert=1\)

This blog covers the custom stressing with the tool.

Lyuben Todorov
  • 13,987
  • 5
  • 50
  • 69
2

Latest cassandra-stress tool provides the option of -schema that you can use to specify your own keyspace/schema. E.g.

cassandra-stress read n=200000 -schema keyspace="myOwnKeyspace"

Kashif
  • 357
  • 1
  • 3
  • 13