You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Oleg Dulin <ol...@gmail.com> on 2013/06/16 12:52:52 UTC
Pycassa xget not parsing composite column name properly
I have a column family defined as:
create column family LSItemIdsByFieldValueIndex_Integer
with column_type = 'Standard'
and comparator =
'CompositeType(org.apache.cassandra.db.marshal.IntegerType,org.apache.cassandra.db.marshal.UTF8Type)'
and default_validation_class = 'UTF8Type'
and key_validation_class = 'UTF8Type';
This snippet of code:
result=searchIndex.get_range(column_count=1)
for key,columns in result:
print '\t',key
indexData=searchIndex[indexCF].xget(key)
for name, value in indexData:
print name
does not correctly print column name as parsed into a tuple of two parts.
Am I doing something wrong here ?
--
Regards,
Oleg Dulin
http://www.olegdulin.com
Re: Pycassa xget not parsing composite column name properly
Posted by Tyler Hobbs <ty...@datastax.com>.
That looks correct, and I just double checked that xget behaves normally
for me for that case. What does it actually print? Can you try not
unpacking the tuple in your inner for-loop and print that?
Also, there's a pycassa mailing list (pycassa-discuss@googlegroups.com)
that would be a better location for this conversation.
On Sun, Jun 16, 2013 at 5:52 AM, Oleg Dulin <ol...@gmail.com> wrote:
> I have a column family defined as:
>
> create column family LSItemIdsByFieldValueIndex_**Integer
> with column_type = 'Standard'
> and comparator = 'CompositeType(org.apache.**cassandra.db.marshal.**
> IntegerType,org.apache.**cassandra.db.marshal.UTF8Type)**'
> and default_validation_class = 'UTF8Type'
> and key_validation_class = 'UTF8Type';
>
> This snippet of code:
>
> result=searchIndex.get_range(**column_count=1)
> for key,columns in result:
> print '\t',key
> indexData=searchIndex[indexCF]**.xget(key)
> for name, value in indexData:
> print name
>
> does not correctly print column name as parsed into a tuple of two parts.
>
> Am I doing something wrong here ?
>
>
>
> --
> Regards,
> Oleg Dulin
> http://www.olegdulin.com
>
>
>
--
Tyler Hobbs
DataStax <http://datastax.com/>