[ 
https://issues.apache.org/jira/browse/CASSANDRA-10725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15029428#comment-15029428
 ] 

Michael Edge edited comment on CASSANDRA-10725 at 11/27/15 3:50 AM:
--------------------------------------------------------------------

{color:red}Note: patch CANNOT be applied to {{v2.1}} or {{v2.2}}. {color}

For these versions the root exception thrown from CFMetaData and CQL3Type does 
not provide any useful information regarding data types, unlike the v3.0 root 
exception. Considering this is a minor issue I don't think it's worthwhile 
changing those classes to provide a more informative exception - this has 
already been taken care of in v3.x.

In v3.0, the root exception is: 
{code}
org.apache.cassandra.exceptions.InvalidRequestException: Unknown type 
autogeneratedtest.map
        at 
org.apache.cassandra.cql3.CQL3Type$Raw$RawUT.prepare(CQL3Type.java:780)
        at 
org.apache.cassandra.cql3.statements.CreateTableStatement$RawStatement.prepare(CreateTableStatement.java:225)

at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:408)
{code}

whereas in v2.1 and v2.2 the root exception is:

{code}
java.lang.RuntimeException: 
org.apache.cassandra.exceptions.InvalidRequestException: Unknown keyspace 
autogeneratedtest
        at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:537)
{code}




was (Author: michaeledge):
{color:red}Note: patch CANNOT be applied to {{v2.1}} or {{v2.2}}. {color}

For these versions the root exception thrown from CFMetaData and CQL3Type does 
not provide any useful information regarding data types, unlike the v3.0 
underlying exception.

In v3.0, the root exception is: 
{code}
org.apache.cassandra.exceptions.InvalidRequestException: Unknown type 
autogeneratedtest.map
        at 
org.apache.cassandra.cql3.CQL3Type$Raw$RawUT.prepare(CQL3Type.java:780)
        at 
org.apache.cassandra.cql3.statements.CreateTableStatement$RawStatement.prepare(CreateTableStatement.java:225)

at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:408)
{code}

whereas in v2.1 and v2.2 the root exception is:

{code}
java.lang.RuntimeException: 
org.apache.cassandra.exceptions.InvalidRequestException: Unknown keyspace 
autogeneratedtest
        at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:537)
{code}



> 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
>          Components: Tools
>            Reporter: Sebastian Estevez
>            Assignee: Michael Edge
>            Priority: Minor
>              Labels: stress, tools
>             Fix For: 3.x
>
>         Attachments: CASSANDRA-3.0-10725-Cassandra-Stress.patch
>
>
> 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)

Reply via email to