You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Kevin Burton <bu...@spinn3r.com> on 2014/11/14 05:55:11 UTC

OR mapping for set appends…

I’m trying to figure out the best way to handle things like set appends
(and other CQL extensions) in traditional OR mapping.

Our OR mapper does basic setFoo() .. then save() to write the record back
to the database.

So if foo is a Sett then I can set all members.

But I want to do some appends with a custom TTL on the set..

this isn’t normally handled in a OR system.

I was thinking of having an AppendSet so if one calls setFoo with a
different Set implementation the OR mapper knows to perform an append.

Thoughts?

-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>
<http://spinn3r.com>

Re: how wide can wide rows get?

Posted by Joe Ramsey <jo...@mac.com>.
You can have up to 2 billion columns but there are some considerations.  

This article might be of some help.

http://www.ebaytechblog.com/2012/08/14/cassandra-data-modeling-best-practices-part-2/#.VGWdT4enCS0 <http://www.ebaytechblog.com/2012/08/14/cassandra-data-modeling-best-practices-part-2/#.VGWdT4enCS0>




> On Nov 14, 2014, at 1:10 AM, Adaryl Bob Wakefield, MBA <ad...@hotmail.com> wrote:
> 
> I’m struggling with this wide row business. Is there an upward limit on the number of columns you can have?
>  
> Adaryl "Bob" Wakefield, MBA
> Principal
> Mass Street Analytics
> 913.938.6685
> www.linkedin.com/in/bobwakefieldmba
> Twitter: @BobLovesData


Re: Re[2]: how wide can wide rows get?

Posted by Takenori Sato <ts...@cloudian.com>.
We have up to a few hundreds of millions of columns in a super wide row.

There are two major issues you should care about.

1. the wider the row is, the more memory pressure you get for every slice
query
2. repair is row based, which means a huge row could be transferred at
every repair

1 is not a big issue if you don't have many concurrent slice requests.
Having more cores is a good investment to reduce memory pressure.

2  could cause very high memory pressure as well as poorer disk utilization.


On Fri, Nov 14, 2014 at 3:21 PM, Plotnik, Alexey <ap...@rhonda.ru> wrote:

>  We have 380k of them in some of our rows and it's ok.
>
> ------ Original Message ------
> From: "Hannu Kröger" <hk...@gmail.com>
> To: "user@cassandra.apache.org" <us...@cassandra.apache.org>
> Sent: 14.11.2014 16:13:49
> Subject: Re: how wide can wide rows get?
>
>
> The theoretical limit is maybe 2 billion but recommended max is around
> 10-20 thousand.
>
> Br,
> Hannu
>
> On 14.11.2014, at 8.10, Adaryl Bob Wakefield, MBA <
> adaryl.wakefield@hotmail.com> wrote:
>
>   I’m struggling with this wide row business. Is there an upward limit on
> the number of columns you can have?
>
> Adaryl "Bob" Wakefield, MBA
> Principal
> Mass Street Analytics
> 913.938.6685
> www.linkedin.com/in/bobwakefieldmba
> Twitter: @BobLovesData
>
>

Re[2]: how wide can wide rows get?

Posted by "Plotnik, Alexey" <ap...@rhonda.ru>.
We have 380k of them in some of our rows and it's ok.

------ Original Message ------
From: "Hannu Kröger" <hk...@gmail.com>>
To: "user@cassandra.apache.org" <us...@cassandra.apache.org>>
Sent: 14.11.2014 16:13:49
Subject: Re: how wide can wide rows get?

The theoretical limit is maybe 2 billion but recommended max is around 10-20 thousand.

Br,
Hannu

On 14.11.2014, at 8.10, Adaryl Bob Wakefield, MBA <ad...@hotmail.com>> wrote:

I’m struggling with this wide row business. Is there an upward limit on the number of columns you can have?

Adaryl "Bob" Wakefield, MBA
Principal
Mass Street Analytics
913.938.6685
www.linkedin.com/in/bobwakefieldmba<http://www.linkedin.com/in/bobwakefieldmba>
Twitter: @BobLovesData

Re: how wide can wide rows get?

Posted by Hannu Kröger <hk...@gmail.com>.
The theoretical limit is maybe 2 billion but recommended max is around 10-20 thousand. 

Br,
Hannu

> On 14.11.2014, at 8.10, Adaryl Bob Wakefield, MBA <ad...@hotmail.com> wrote:
> 
> I’m struggling with this wide row business. Is there an upward limit on the number of columns you can have?
>  
> Adaryl "Bob" Wakefield, MBA
> Principal
> Mass Street Analytics
> 913.938.6685
> www.linkedin.com/in/bobwakefieldmba
> Twitter: @BobLovesData

how wide can wide rows get?

Posted by "Adaryl \"Bob\" Wakefield, MBA" <ad...@hotmail.com>.
I’m struggling with this wide row business. Is there an upward limit on the number of columns you can have?

Adaryl "Bob" Wakefield, MBA
Principal
Mass Street Analytics
913.938.6685
www.linkedin.com/in/bobwakefieldmba
Twitter: @BobLovesData 

Re: OR mapping for set appends…

Posted by DuyHai Doan <do...@gmail.com>.
Alternatively build a SetWrapper that extends the Java sets interface and
intercepts calls to add(), addAll(), remove() ....

 For each of these method, the SetWrapper will generate an appropriate
UPDATE statement. This is more general purpose than just an AppendSet.

TTL is another story, it is an extra option you can add to any
insert/update query

On Fri, Nov 14, 2014 at 5:55 AM, Kevin Burton <bu...@spinn3r.com> wrote:

> I’m trying to figure out the best way to handle things like set appends
> (and other CQL extensions) in traditional OR mapping.
>
> Our OR mapper does basic setFoo() .. then save() to write the record back
> to the database.
>
> So if foo is a Sett then I can set all members.
>
> But I want to do some appends with a custom TTL on the set..
>
> this isn’t normally handled in a OR system.
>
> I was thinking of having an AppendSet so if one calls setFoo with a
> different Set implementation the OR mapper knows to perform an append.
>
> Thoughts?
>
> --
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>
> <http://spinn3r.com>
>
>