You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Edge (JIRA)" <ji...@apache.org> on 2015/11/27 03:51:10 UTC
[jira] [Commented] (CASSANDRA-10725) Stress gives "Unknown
keyspace" error when a map type is used in user profile
[ https://issues.apache.org/jira/browse/CASSANDRA-10725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15029360#comment-15029360 ]
Michael Edge commented on CASSANDRA-10725:
------------------------------------------
[~sebastian.estevez@datastax.com], in which version did you discover this?
I tested against trunk and received a NullPointerException. However, the piece of code causing the NPE is the same line of code that causes your {quote}There was a problem parsing the table cql: Unknown keyspace autogeneratedtest{quote}
The exception is thrown by {{StressProfile.java}}, and the real underlying exception is:
{code}
org.apache.cassandra.exceptions.InvalidRequestException: Unknown type autogeneratedtest.map
{code}
This exception is lost by the line of code in StressProfile.java that throws the exception. Also, the NPE is thrown by {{e.getCause()}}
{code}
throw new IllegalArgumentException("There was a problem parsing the table cql: " + e.getCause().getMessage());
{code}
I believe this line of code should be changed to:
{code}
throw new IllegalArgumentException("There was a problem parsing the table cql: " + e.getMessage());
{code}
After making this change the following message appears:
{quote}There was a problem parsing the table cql: Unknown type autogeneratedtest.map{quote}
Patch for trunk attached.
> Stress gives "Unknown keyspace" error when a map type is used in user profile
> -----------------------------------------------------------------------------
>
> Key: CASSANDRA-10725
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10725
> Project: Cassandra
> Issue Type: Bug
> Reporter: Sebastian Estevez
>
> Steps to reproduce:
> copy the following stress.yaml:
> {code}# Keyspace Name
> keyspace: autogeneratedtest
>
> # The CQL for creating a keyspace (optional if it already exists)
> keyspace_definition: |
> CREATE KEYSPACE autogeneratedtest WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
>
> # Table name
> table: smartcity_data
>
> # The CQL for creating a table you wish to stress (optional if it already exists)
> table_definition:
> CREATE TABLE smartcity_data (
> device text,
> reporter text,
> time timestamp,
> data_ map,
> metadata_ text,
> solr_query text,
> timeack timestamp,
> timefalse timestamp,
> timeresolved timestamp,
> PRIMARY KEY (device, reporter, time)
> )
> ### Column Distribution Specifications ###
>
> columnspec:
> - name: device
> size: fixed(10)
> population: uniform(1..10)
>
> - name: reporter
> size: fixed(10)
> population: uniform(1..10)
>
> - name: time
> size: fixed(10)
> population: uniform(1..10)
>
> - name: data_
> size: fixed(10)
> population: uniform(1..10)
>
> - name: metadata_
> size: fixed(10)
> population: uniform(1..10)
>
> - name: solr_query
> size: fixed(10)
> population: uniform(1..10)
>
> - name: timeack
> size: fixed(10)
> population: uniform(1..10)
>
> - name: timefalse
> size: fixed(10)
> population: uniform(1..10)
>
> - name: timeresolved
> size: fixed(10)
> population: uniform(1..10)
>
>
> ### Batch Ratio Distribution Specifications ###
>
> insert:
> partitions: fixed(1) # Our partition key is the domain so only insert one per batch
>
> select: fixed(1)/1000 # We have 1000 posts per domain so 1/1000 will allow 1 post per batch
>
> batchtype: UNLOGGED # Unlogged batches
>
>
> #
> # A list of queries you wish to run against the schema
> #
> queries:
> likelyquery0:
> cql: Select * from smartcity_data where device = ?
> fields: samerow
> likelyquery1:
> cql: Select * from smartcity_data where device = ? and reporter = ?
> fields: samerow
> likelyquery2:
> cql: Select * from smartcity_data where device = ? and reporter = ? and time = ?
> fields: samerow{code}
> and run:
> {code}cassandra-stress user profile=stress.yaml ops\(insert=1\) n=10 -rate threads=1
> There was a problem parsing the table cql: Unknown keyspace autogeneratedtest{code}
> You'll see the following error:
> {quote}
> There was a problem parsing the table cql: Unknown keyspace autogeneratedtest
> {quote}
> The error should instead state:
> {quote}Maps are not currently supported in cassandra-stress{quote}
> If you replace `data_ map`, with `data_ text` it works fine.
> Related: CASSANDRA-9091
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)