You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by user 01 <us...@gmail.com> on 2014/05/29 16:05:49 UTC

With Astyanax, How do I write same column to multiple rows efficiently ?

With Hector I used to create a column object once & add that to multiple
row mutations but with Astyanax it creates a new column object for each row
mutation in a mutation batch so if I need to add a same column to 1000
rows, it creates the column object 100 times. Isn't there a better way to
add same column to multiple rows more efficiently ? Probably I should be
able to create a column object once & be able to add that to multiple row
mutations via Astyanax.

I have several scenario in my app where I am doing this sort of mutations.

Re: With Astyanax, How do I write same column to multiple rows efficiently ?

Posted by DuyHai Doan <do...@gmail.com>.
Sure it can be done, you can submit them a pull request. I'm sure they'll
be happy to merge it.


On Thu, May 29, 2014 at 5:59 PM, user 01 <us...@gmail.com> wrote:

> But won't it be nice if the API just provides a method to do so more
> efficiently since it is easily possible? This is not a big deal for API.
>
>
> On Thu, May 29, 2014 at 9:11 PM, DuyHai Doan <do...@gmail.com> wrote:
>
>> "so if I need to add a same column to 1000 rows, it creates the column
>> object 100 times" --> is it really an issue ? Even if Astyanax creates 1
>> millions of column objects, as long as they die young and respect the
>> generational hypothesis of the JVM, it's fine.
>>
>>
>> On Thu, May 29, 2014 at 4:05 PM, user 01 <us...@gmail.com> wrote:
>>
>>> With Hector I used to create a column object once & add that to multiple
>>> row mutations but with Astyanax it creates a new column object for each row
>>> mutation in a mutation batch so if I need to add a same column to 1000
>>> rows, it creates the column object 100 times. Isn't there a better way to
>>> add same column to multiple rows more efficiently ? Probably I should be
>>> able to create a column object once & be able to add that to multiple row
>>> mutations via Astyanax.
>>>
>>> I have several scenario in my app where I am doing this sort of
>>> mutations.
>>>
>>
>>
>

Re: With Astyanax, How do I write same column to multiple rows efficiently ?

Posted by user 01 <us...@gmail.com>.
But won't it be nice if the API just provides a method to do so more
efficiently since it is easily possible? This is not a big deal for API.


On Thu, May 29, 2014 at 9:11 PM, DuyHai Doan <do...@gmail.com> wrote:

> "so if I need to add a same column to 1000 rows, it creates the column
> object 100 times" --> is it really an issue ? Even if Astyanax creates 1
> millions of column objects, as long as they die young and respect the
> generational hypothesis of the JVM, it's fine.
>
>
> On Thu, May 29, 2014 at 4:05 PM, user 01 <us...@gmail.com> wrote:
>
>> With Hector I used to create a column object once & add that to multiple
>> row mutations but with Astyanax it creates a new column object for each row
>> mutation in a mutation batch so if I need to add a same column to 1000
>> rows, it creates the column object 100 times. Isn't there a better way to
>> add same column to multiple rows more efficiently ? Probably I should be
>> able to create a column object once & be able to add that to multiple row
>> mutations via Astyanax.
>>
>> I have several scenario in my app where I am doing this sort of
>> mutations.
>>
>
>

Re: With Astyanax, How do I write same column to multiple rows efficiently ?

Posted by DuyHai Doan <do...@gmail.com>.
"so if I need to add a same column to 1000 rows, it creates the column
object 100 times" --> is it really an issue ? Even if Astyanax creates 1
millions of column objects, as long as they die young and respect the
generational hypothesis of the JVM, it's fine.


On Thu, May 29, 2014 at 4:05 PM, user 01 <us...@gmail.com> wrote:

> With Hector I used to create a column object once & add that to multiple
> row mutations but with Astyanax it creates a new column object for each row
> mutation in a mutation batch so if I need to add a same column to 1000
> rows, it creates the column object 100 times. Isn't there a better way to
> add same column to multiple rows more efficiently ? Probably I should be
> able to create a column object once & be able to add that to multiple row
> mutations via Astyanax.
>
> I have several scenario in my app where I am doing this sort of mutations.
>

Re: With Astyanax, How do I write same column to multiple rows efficiently ?

Posted by user 01 <us...@gmail.com>.
I am using Astyanax over thrift driver.


On Thu, May 29, 2014 at 7:35 PM, user 01 <us...@gmail.com> wrote:

> With Hector I used to create a column object once & add that to multiple
> row mutations but with Astyanax it creates a new column object for each row
> mutation in a mutation batch so if I need to add a same column to 1000
> rows, it creates the column object 100 times. Isn't there a better way to
> add same column to multiple rows more efficiently ? Probably I should be
> able to create a column object once & be able to add that to multiple row
> mutations via Astyanax.
>
> I have several scenario in my app where I am doing this sort of mutations.
>