DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


ds-steven-matison avatar image
ds-steven-matison asked ·

DS210 Error with Stress Test

First i want to pre-empt that the only search match for this error in google is a previous Closed question (reference). However, I am getting the same error with the self edited file from the exercise and the provided edited file TestProfileEdited.yaml.


cassandra-stress user profile=/home/ubuntu/labwork/TestProfileEdited.yaml ops\(insert=1,user_by_email=3\) -node ds210-node1


java.lang.IllegalArgumentException: No query defined with name user_by_email
at org.apache.cassandra.stress.StressProfile.getQuery(
at org.apache.cassandra.stress.settings.SettingsCommandUser$1.get(
at org.apache.cassandra.stress.settings.SettingsCommandUser$1.get(
at org.apache.cassandra.stress.operations.SampledOpDistributionFactory$1.get(
at org.apache.cassandra.stress.StressAction$Consumer.<init>(
at org.apache.cassandra.stress.StressAction.warmup(
at org.apache.cassandra.stress.Stress.main(

Yaml Contents:

# Keyspace name and create CQL
keyspace: killr_video
keyspace_definition: |
  CREATE KEYSPACE killr_video WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'};

# Table name and create CQL
table: user_by_email
table_definition: |
  CREATE TABLE user_by_email (
    email TEXT,
    password TEXT,
    user_id UUID,
    PRIMARY KEY ((email))

# Meta information for generating data
  - name: email
    size: gaussian(8..30)
    population: exp(1..1000000)
  - name: password
    size: exp(8..30)
    population: uniform(1..1000000)
  - name: user_id
    size: fixed(4)
    population: uniform(1..1000000)

# Specs for insert queries
  partitions: fixed(1)
  batchtype: UNLOGGED       # use unlogged batches
  select: fixed(1)/1

# Read queries to run against the schema
      cql: select * from user_by_email where email = ?
      fields: samerow

Can anyone help?

10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

bettina.swynnerton avatar image
bettina.swynnerton answered ·

Hi @ds-steven-matison,

You are specifying on the command line to use the query user_by_email, but it is not defined in your profile.

The two queries that are defined in your profile are insert and get_user.

I tried your profile with the following command, and it ran successfully:

cassandra-stress user profile=new_profile.yaml ops\(insert=1,get_user=3\)

Here some more info on Cassandra-Stress:

See here for the ops(?) option:

Specify what operations to run and the number of each. (only with the user option)

But these operations need to be defined in your profile, or you are getting the exception that you have been seeing.

I hope this helps you to run your stress test successfully.

10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.