Cassandra-Stress error when loading a user Yaml file

792 views
Skip to first unread message

ashraf.youssef.mahgoub@gmail.com

<ashraf.youssef.mahgoub@gmail.com>
unread,
Dec 30, 2016, 1:44:19 PM12/30/16
to ScyllaDB users
Hello

I used ScyllaDB' cassandra-stress tool with user defined YAML file which seems to be supported.

Command: cassandra-stress user profile=/home/ubuntu/datastax-ddc-3.7.0/tools/cqlstress-example.yaml ops\(insert=1\)

 However, I am getting the following error:

Exception in thread "main" java.io.IOError: Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.stress.StressYaml; exception=Cannot create property=token_range_queries for JavaBean=org.apache.cassandra.stress.StressYaml@2b80d80f; Unable to find property 'token_range_queries' on class: org.apache.cassandra.stress.StressYaml
 in 'reader', line 17, column 1:
    keyspace: stresscql
    ^

        at org.apache.cassandra.stress.StressProfile.load(StressProfile.java:565)
        at org.apache.cassandra.stress.settings.SettingsCommandUser.<init>(SettingsCommandUser.java:63)
        at org.apache.cassandra.stress.settings.SettingsCommandUser.build(SettingsCommandUser.java:132)
        at org.apache.cassandra.stress.settings.SettingsCommand.get(SettingsCommand.java:195)
        at org.apache.cassandra.stress.settings.StressSettings.get(StressSettings.java:249)
        at org.apache.cassandra.stress.settings.StressSettings.parse(StressSettings.java:220)
        at org.apache.cassandra.stress.Stress.main(Stress.java:58)
Caused by: Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.stress.StressYaml; exception=Cannot create property=token_range_queries for JavaBean=org.apache.cassandra.stress.StressYaml@2b80d80f; Unable to find property 'token_range_queries' on class: org.apache.cassandra.stress.StressYaml
 in 'reader', line 17, column 1:
    keyspace: stresscql
    ^

The YAML file contents are:
#
# Keyspace info
#
keyspace: stresscql

#
# The CQL for creating a keyspace (optional if it already exists)
#
keyspace_definition: |
  CREATE KEYSPACE stresscql WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};

#
# Table info
#
table: typestest

#
# The CQL for creating a table you wish to stress (optional if it already exists)
#
table_definition: |
  CREATE TABLE typestest (
        name text,
        choice boolean,
        date timestamp,
        address inet,
        dbl double,
        lval bigint,
        ival int,
        uid timeuuid,
        value blob,
        PRIMARY KEY((name,choice), date, address, dbl, lval, ival, uid)
  )
    WITH compaction = { 'class':'LeveledCompactionStrategy' }
#    AND compression = { 'sstable_compression' : '' }
#    AND comment='A table of many types to test wide rows'

Any help ?

Tzach Livyatan

<tzach@scylladb.com>
unread,
Jan 1, 2017, 4:21:12 AM1/1/17
to ScyllaDB users
Hi Ashraf

Two issues you might hit:
1. The YAML file should include the insert and query parts.
For example:

insert:
  partitions: fixed(1)
  select:    fixed(1)/1000
  batchtype: UNLOGGED

queries:
   gettest:
      cql: select * from typestest where name = ? and choice = ?
      fields: samerow

You can then use

cassandra-stress user profile=~/tmp/test.yaml ops\(gettest=1\) -rate threads=100 -node 172.17.0.2
cassandra-stress user profile=~/tmp/test.yaml ops\(insert=1\) -rate threads=100 -node 172.17.0.2

2. You are using a non-compatible cassandra-stress.
Please try using the cassandra-stress provided with scylla and let us know what are the results.

Regards
Tzach

--
You received this message because you are subscribed to the Google Groups "ScyllaDB users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scylladb-users+unsubscribe@googlegroups.com.
To post to this group, send email to scylladb-users@googlegroups.com.
Visit this group at https://groups.google.com/group/scylladb-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/scylladb-users/6fb7553f-3628-49c5-89a0-eeebbeb70766%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

nahushppatil@gmail.com

<nahushppatil@gmail.com>
unread,
Jan 26, 2017, 2:04:42 PM1/26/17
to ScyllaDB users, ashraf.youssef.mahgoub@gmail.com
Hello Ashraf,

Were you able to solve that issue? I am facing the same problem for all the lines. Inputs would be helpful

Dor Laor

<dor@scylladb.com>
unread,
Jan 26, 2017, 2:21:33 PM1/26/17
to ScyllaDB users, ashraf.youssef.mahgoub@gmail.com
Do you run the ScyllaDB version of Cassandra-stress? Can you install our rpm on the client too?
It does work for folks here

--
You received this message because you are subscribed to the Google Groups "ScyllaDB users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scylladb-users+unsubscribe@googlegroups.com.
To post to this group, send email to scylladb-users@googlegroups.com.
Visit this group at https://groups.google.com/group/scylladb-users.

Nahush Patil

<nahushppatil@gmail.com>
unread,
Jan 26, 2017, 2:23:38 PM1/26/17
to scylladb-users@googlegroups.com, ashraf.youssef.mahgoub@gmail.com
No I am using DSE version of Cassandra. Is it that Cassandra stress with dse version gives problems?

To unsubscribe from this group and stop receiving emails from it, send an email to scylladb-user...@googlegroups.com.

To post to this group, send email to scyllad...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "ScyllaDB users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scylladb-users/HSEUiG5vi1k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scylladb-user...@googlegroups.com.
To post to this group, send email to scyllad...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--

Best Regards,
Nahush

Dor Laor

<dor@scylladb.com>
unread,
Jan 26, 2017, 2:29:45 PM1/26/17
to ScyllaDB users, ashraf.youssef.mahgoub@gmail.com
I actually don't know but this is what Tzach (our product mngr) recommends. In the past
we played with thrift changes but since we completely adopted thrift it should be fine.
While we wait for Tzach's answer, I suggest you'll just check with our rpm. 

To unsubscribe from this group and stop receiving emails from it, send an email to scylladb-users+unsubscribe@googlegroups.com.

To post to this group, send email to scylladb-users@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "ScyllaDB users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scylladb-users/HSEUiG5vi1k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scylladb-users+unsubscribe@googlegroups.com.
To post to this group, send email to scylladb-users@googlegroups.com.
--

Best Regards,
Nahush

--
You received this message because you are subscribed to the Google Groups "ScyllaDB users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scylladb-users+unsubscribe@googlegroups.com.
To post to this group, send email to scylladb-users@googlegroups.com.

Glauber Costa

<glauber@scylladb.com>
unread,
Jan 26, 2017, 2:30:08 PM1/26/17
to ScyllaDB users, ashraf.youssef.mahgoub@gmail.com
On Thu, Jan 26, 2017 at 2:23 PM, Nahush Patil <nahush...@gmail.com> wrote:
> No I am using DSE version of Cassandra. Is it that Cassandra stress with dse
> version gives problems?

Does that profile work against Cassandra?
The error looks like a parsing error. It doesn't seem to me like the
database was ever contacted.
> https://groups.google.com/d/msgid/scylladb-users/CACQHfNcTb41W644_PriDP7T51r6YURdLnsHGxN2f40UJX8zx_Q%40mail.gmail.com.

nahushppatil@gmail.com

<nahushppatil@gmail.com>
unread,
Jan 27, 2017, 1:03:14 AM1/27/17
to ScyllaDB users, ashraf.youssef.mahgoub@gmail.com
Yes its a parsing error which I am getting on each line. Exception says unable to find property in org.apache.cassandra.stress.StressYaml. I am clueless as my yaml file seems perfect. Any inputs would be of great help. Thanks in advance

Glauber Costa

<glauber@scylladb.com>
unread,
Jan 27, 2017, 12:41:47 PM1/27/17
to ScyllaDB users, ashraf mahgoub
Find attached a file that works.

You are missing two things:
1) you need a queries section, even if you don't use it.

Amnon pointed at that, but yaml is unfortunately very picky at text
indentation and other small details. So on top of that you also have
to make sure that the columns are formatted correctly, with the right
spacing at the beginning.

The file I am attached works, but I would also advise you to set
distributions to the fields you want to test (the "columnspec"
session). Without that, cassandra-stress will pick defaults that may
or may not be what you want.

Cheers.
> https://groups.google.com/d/msgid/scylladb-users/d6e35ae6-ca8c-423c-ac6e-a2f0d6444e1d%40googlegroups.com.
ashraf.yaml

Glauber Costa

<glauber@scylladb.com>
unread,
Feb 2, 2017, 2:19:52 PM2/2/17
to ScyllaDB users, ashraf mahgoub
Hi

Did you manage to get this working ?

ashraf mahgoub

<ashraf.youssef.mahgoub@gmail.com>
unread,
Feb 2, 2017, 2:24:48 PM2/2/17
to Glauber Costa, ScyllaDB users
Hi

Yes I got it to work, It turned out that I'm using the same YAML file I was using for cassandra, which defined a range query as:

token_range_queries:
  all_columns_tr_query:
    columns: '*'
    page_size: 5000

  value_tr_query:
    columns: value

While range queries are not supported yet in ScyllaDB.

Best

>> email to scylladb-users+unsubscribe@googlegroups.com.
>> To post to this group, send email to scylladb-users@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages