cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "victorsosa (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-6402) cannot query using DynamicCompositeType
Date Sat, 23 Nov 2013 21:12:35 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-6402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

victorsosa updated CASSANDRA-6402:
----------------------------------

    Since Version: 2.0.2
      Description: 
HI,

I cannot query using DynamicCompositeType. 

And this is how it is define the column family:
DynamicCompositeType (l=>LongType,t=>TimeUUIDType,s=>UTF8Type,S=>UTF8Type(reversed=true),L=>LongType(reversed=true),T=>TimeUUIDType(reversed=true))

this code is from the project countandra:
csdb.createColumnFamily(
				CassandraStorage.s_keySpace,
				countandraCF,
				"UTF8Type",
				"DynamicCompositeType (l=>LongType,t=>TimeUUIDType,s=>UTF8Type,S=>UTF8Type(reversed=true),L=>LongType(reversed=true),T=>TimeUUIDType(reversed=true))",
				"CounterColumnType");

you can get the code for test from:
https://github.com/milindparikh/Countandra

The Hector api is calling the same column family with data and it is WORKING FINE, the issue
is only when I am trying to use CQL to query the table "ddcc".

NOTE: the project is using cassandra 1.0.1, I updated it to cassandra 2.0.2

If I try something like:
select * from ddcc; 

Error get trying to query a table that have a DynamicCompositeType
========================================
cqlsh> use countandra;
cqlsh:countandra> select * from ddcc;
Traceback (most recent call last):
  File "./cqlsh", line 901, in perform_statement_untraced
    self.cursor.execute(statement, decoder=decoder)
  File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 81, in execute
    return self.process_execution_results(response, decoder=decoder)
  File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/thrifteries.py", line 116, in process_execution_results
    self.get_metadata_info(self.result[0])
  File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 97, in get_metadata_info
    name, nbytes, vtype, ctype = self.get_column_metadata(colid)
  File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 104, in get_column_metadata
    return self.decoder.decode_metadata_and_type(column_id)
  File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/decoders.py", line 40, in decode_metadata_and_type
    valdtype = cqltypes.lookup_casstype(validator)
  File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cqltypes.py", line 145, in lookup_casstype
    raise ValueError("Don't know how to parse type string %r: %s" % (casstype, e))
ValueError: Don't know how to parse type string 'org.apache.cassandra.db.marshal.DynamicCompositeType(T=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType)':
weird characters '=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType)'
at end




  was:
HI,

I cannot query using DynamicCompositeType. 

And this is how I define the column family:
DynamicCompositeType (l=>LongType,t=>TimeUUIDType,s=>UTF8Type,S=>UTF8Type(reversed=true),L=>LongType(reversed=true),T=>TimeUUIDType(reversed=true))

If I try something like:
select * from ddcc; 

Error get trying to query a table that have a DynamicCompositeType
========================================
cqlsh> use countandra;
cqlsh:countandra> select * from ddcc;
Traceback (most recent call last):
  File "./cqlsh", line 901, in perform_statement_untraced
    self.cursor.execute(statement, decoder=decoder)
  File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 81, in execute
    return self.process_execution_results(response, decoder=decoder)
  File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/thrifteries.py", line 116, in process_execution_results
    self.get_metadata_info(self.result[0])
  File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 97, in get_metadata_info
    name, nbytes, vtype, ctype = self.get_column_metadata(colid)
  File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 104, in get_column_metadata
    return self.decoder.decode_metadata_and_type(column_id)
  File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/decoders.py", line 40, in decode_metadata_and_type
    valdtype = cqltypes.lookup_casstype(validator)
  File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cqltypes.py", line 145, in lookup_casstype
    raise ValueError("Don't know how to parse type string %r: %s" % (casstype, e))
ValueError: Don't know how to parse type string 'org.apache.cassandra.db.marshal.DynamicCompositeType(T=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType)':
weird characters '=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType)'
at end



> cannot query using DynamicCompositeType
> ---------------------------------------
>
>                 Key: CASSANDRA-6402
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6402
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API, Core
>            Reporter: victorsosa
>
> HI,
> I cannot query using DynamicCompositeType. 
> And this is how it is define the column family:
> DynamicCompositeType (l=>LongType,t=>TimeUUIDType,s=>UTF8Type,S=>UTF8Type(reversed=true),L=>LongType(reversed=true),T=>TimeUUIDType(reversed=true))
> this code is from the project countandra:
> csdb.createColumnFamily(
> 				CassandraStorage.s_keySpace,
> 				countandraCF,
> 				"UTF8Type",
> 				"DynamicCompositeType (l=>LongType,t=>TimeUUIDType,s=>UTF8Type,S=>UTF8Type(reversed=true),L=>LongType(reversed=true),T=>TimeUUIDType(reversed=true))",
> 				"CounterColumnType");
> you can get the code for test from:
> https://github.com/milindparikh/Countandra
> The Hector api is calling the same column family with data and it is WORKING FINE, the
issue is only when I am trying to use CQL to query the table "ddcc".
> NOTE: the project is using cassandra 1.0.1, I updated it to cassandra 2.0.2
> If I try something like:
> select * from ddcc; 
> Error get trying to query a table that have a DynamicCompositeType
> ========================================
> cqlsh> use countandra;
> cqlsh:countandra> select * from ddcc;
> Traceback (most recent call last):
>   File "./cqlsh", line 901, in perform_statement_untraced
>     self.cursor.execute(statement, decoder=decoder)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 81, in execute
>     return self.process_execution_results(response, decoder=decoder)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/thrifteries.py", line 116,
in process_execution_results
>     self.get_metadata_info(self.result[0])
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 97, in get_metadata_info
>     name, nbytes, vtype, ctype = self.get_column_metadata(colid)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 104, in get_column_metadata
>     return self.decoder.decode_metadata_and_type(column_id)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/decoders.py", line 40, in
decode_metadata_and_type
>     valdtype = cqltypes.lookup_casstype(validator)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cqltypes.py", line 145, in
lookup_casstype
>     raise ValueError("Don't know how to parse type string %r: %s" % (casstype, e))
> ValueError: Don't know how to parse type string 'org.apache.cassandra.db.marshal.DynamicCompositeType(T=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType)':
weird characters '=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType)'
at end



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message