You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Greg Fausak <gr...@named.com> on 2012/08/02 17:50:33 UTC

composite table with cassandra without using cql3?

I've been using the cql3 to create a composite table.
Can I use the thrift interface to accomplish the
same thing?  In other words, do I have to use cql 3 to
get a composite table type? (The same behavior as
multiple PRIMARY key columns).

Thanks,
---greg

Re: composite table with cassandra without using cql3?

Posted by Greg Fausak <gr...@named.com>.
I had to give up on using CQL and thrift, and go to composites created
and accessed in thrift.  I'm using Hector for java access and python
for scripting
access.

-g


On Sun, Aug 19, 2012 at 5:19 AM, Georg Köster <ge...@gmail.com> wrote:
> Hi all,
>
> I had problems creating a table with composite keys with CQL 3 and accessing
> it via thrift.
>
> AFAIK the comparators weren't set up in a compatible way. Probably due to
> betaness of CQL 3.
>
> So I'm now creating and using CFs with Composite Columns exclusively via
> thrift/Astyanax. Pelops works too.
>
> Astyanax composite help:
> https://github.com/Netflix/astyanax/wiki/Examples - Search for Composite.
> Beware that the serializer currently doesn't find annotated fields if they
> are inherited.
>
> Cheers!
> Georg
>
> On Sat, Aug 18, 2012 at 1:29 AM, Ben Frank <be...@airlust.com> wrote:
>>
>> Hi Dean,
>>    I'm interested in this too, but I get a 404 with the link below, looks
>> like I can't see your nosqlORM project.
>>
>> -Ben
>>
>>
>> On Thu, Aug 2, 2012 at 9:04 AM, Hiller, Dean <De...@nrel.gov> wrote:
>>>
>>> For how to do it with astyanax, you can see here...
>>>
>>> Lines 310 and 335
>>>
>>>
>>> https://github.com/deanhiller/nosqlORM/blob/indexing/input/javasrc/com/alva
>>> zan/orm/layer3/spi/db/cassandra/CassandraSession.java
>>>
>>>
>>> For how to do with thrift, you could look at astyanax.
>>>
>>> I use it on that project for indexing for the ORM layer we use(which is
>>> not listed on the cassandra ORM's page as of yet ;) ).
>>>
>>> Later,
>>> Dean
>>>
>>>
>>> On 8/2/12 9:50 AM, "Greg Fausak" <gr...@named.com> wrote:
>>>
>>> >I've been using the cql3 to create a composite table.
>>> >Can I use the thrift interface to accomplish the
>>> >same thing?  In other words, do I have to use cql 3 to
>>> >get a composite table type? (The same behavior as
>>> >multiple PRIMARY key columns).
>>> >
>>> >Thanks,
>>> >---greg
>>>
>>
>

Re: composite table with cassandra without using cql3?

Posted by Georg Köster <ge...@gmail.com>.
Hi all,

I had problems creating a table with composite keys with CQL 3 and
accessing it via thrift.

AFAIK the comparators weren't set up in a compatible way. Probably due to
betaness of CQL 3.

So I'm now creating and using CFs with Composite Columns exclusively via
thrift/Astyanax. Pelops works too.

Astyanax composite help:
https://github.com/Netflix/astyanax/wiki/Examples - Search for Composite.
Beware that the serializer currently doesn't find annotated fields if they
are inherited.

Cheers!
Georg

On Sat, Aug 18, 2012 at 1:29 AM, Ben Frank <be...@airlust.com> wrote:

> Hi Dean,
>    I'm interested in this too, but I get a 404 with the link below, looks
> like I can't see your nosqlORM project.
>
> -Ben
>
>
> On Thu, Aug 2, 2012 at 9:04 AM, Hiller, Dean <De...@nrel.gov> wrote:
>
>> For how to do it with astyanax, you can see here...
>>
>> Lines 310 and 335
>>
>>
>> https://github.com/deanhiller/nosqlORM/blob/indexing/input/javasrc/com/alva
>> zan/orm/layer3/spi/db/cassandra/CassandraSession.java<https://github.com/deanhiller/nosqlORM/blob/indexing/input/javasrc/com/alvazan/orm/layer3/spi/db/cassandra/CassandraSession.java>
>>
>>
>> For how to do with thrift, you could look at astyanax.
>>
>> I use it on that project for indexing for the ORM layer we use(which is
>> not listed on the cassandra ORM's page as of yet ;) ).
>>
>> Later,
>> Dean
>>
>>
>> On 8/2/12 9:50 AM, "Greg Fausak" <gr...@named.com> wrote:
>>
>> >I've been using the cql3 to create a composite table.
>> >Can I use the thrift interface to accomplish the
>> >same thing?  In other words, do I have to use cql 3 to
>> >get a composite table type? (The same behavior as
>> >multiple PRIMARY key columns).
>> >
>> >Thanks,
>> >---greg
>>
>>
>

(new nosqlOrm linke) composite table with cassandra without using cql3?

Posted by "Hiller, Dean" <De...@nrel.gov>.
Sorry, project went through a rename and I didn't realize links changed…

https://github.com/deanhiller/playorm/blob/master/input/javasrc/com/alvazan/orm/layer9z/spi/db/cassandra/CassandraSession.java

NOTE: You can look for the trick we use to store all longs, ints, shorts as smallest possible bytes every time.  In fact, a long between –128 and 127 takes up one byte in the value part and then of course takes up space in the name part.  But overall, it can save lots of space.  (we do same thing with decimal types).

Later,
Dean


From: Ben Frank <be...@airlust.com>>
Reply-To: "user@cassandra.apache.org<ma...@cassandra.apache.org>" <us...@cassandra.apache.org>>
Date: Friday, August 17, 2012 5:29 PM
To: "user@cassandra.apache.org<ma...@cassandra.apache.org>" <us...@cassandra.apache.org>>
Subject: Re: composite table with cassandra without using cql3?

Hi Dean,
   I'm interested in this too, but I get a 404 with the link below, looks like I can't see your nosqlORM project.

-Ben

On Thu, Aug 2, 2012 at 9:04 AM, Hiller, Dean <De...@nrel.gov>> wrote:
For how to do it with astyanax, you can see here...

Lines 310 and 335

https://github.com/deanhiller/nosqlORM/blob/indexing/input/javasrc/com/alva
zan/orm/layer3/spi/db/cassandra/CassandraSession.java


For how to do with thrift, you could look at astyanax.

I use it on that project for indexing for the ORM layer we use(which is
not listed on the cassandra ORM's page as of yet ;) ).

Later,
Dean


On 8/2/12 9:50 AM, "Greg Fausak" <gr...@named.com>> wrote:

>I've been using the cql3 to create a composite table.
>Can I use the thrift interface to accomplish the
>same thing?  In other words, do I have to use cql 3 to
>get a composite table type? (The same behavior as
>multiple PRIMARY key columns).
>
>Thanks,
>---greg



Re: composite table with cassandra without using cql3?

Posted by Ben Frank <be...@airlust.com>.
Hi Dean,
   I'm interested in this too, but I get a 404 with the link below, looks
like I can't see your nosqlORM project.

-Ben

On Thu, Aug 2, 2012 at 9:04 AM, Hiller, Dean <De...@nrel.gov> wrote:

> For how to do it with astyanax, you can see here...
>
> Lines 310 and 335
>
> https://github.com/deanhiller/nosqlORM/blob/indexing/input/javasrc/com/alva
> zan/orm/layer3/spi/db/cassandra/CassandraSession.java
>
>
> For how to do with thrift, you could look at astyanax.
>
> I use it on that project for indexing for the ORM layer we use(which is
> not listed on the cassandra ORM's page as of yet ;) ).
>
> Later,
> Dean
>
>
> On 8/2/12 9:50 AM, "Greg Fausak" <gr...@named.com> wrote:
>
> >I've been using the cql3 to create a composite table.
> >Can I use the thrift interface to accomplish the
> >same thing?  In other words, do I have to use cql 3 to
> >get a composite table type? (The same behavior as
> >multiple PRIMARY key columns).
> >
> >Thanks,
> >---greg
>
>

Re: composite table with cassandra without using cql3?

Posted by "Hiller, Dean" <De...@nrel.gov>.
For how to do it with astyanax, you can see here...

Lines 310 and 335

https://github.com/deanhiller/nosqlORM/blob/indexing/input/javasrc/com/alva
zan/orm/layer3/spi/db/cassandra/CassandraSession.java


For how to do with thrift, you could look at astyanax.

I use it on that project for indexing for the ORM layer we use(which is
not listed on the cassandra ORM's page as of yet ;) ).

Later,
Dean


On 8/2/12 9:50 AM, "Greg Fausak" <gr...@named.com> wrote:

>I've been using the cql3 to create a composite table.
>Can I use the thrift interface to accomplish the
>same thing?  In other words, do I have to use cql 3 to
>get a composite table type? (The same behavior as
>multiple PRIMARY key columns).
>
>Thanks,
>---greg