Mutator with configurable consistency level

119 views
Skip to first unread message

Elyran Kogan

unread,
Apr 15, 2012, 3:31:44 AM4/15/12
to hector-users
I am using Mutator for all my Write actions, and I also want to use
ConfigurableConststencyLevel, in which I want to define different
levels for different column families

the problem is that in MutatorImpl - the execute() method uses
consistencyLevelPolicy.get(operationType) - (instead of using
consistencyLevelPolicy.get(operationType, columnFamily) )which will
return the default instead of returning the consistency level of the
specific column family.

it looks like a bug to me...

is there any way to use the mutator with configurable consistency
level?

Thanks,
Elyran.
--
This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this on behalf of the
addressee you must not use, copy, disclose or take action based on this
message or any information herein.
If you have received this message in error, please advise the sender
immediately by reply email and delete this message. Thank you.

Nate McCall

unread,
Apr 15, 2012, 11:09:16 AM4/15/12
to hector...@googlegroups.com
The problem is that mutation object can execute against multiple
column families. That said, we should have a way to push in a
consistency level specific to the operation (not only hear, but this
is an issue across the board).

For now, I might add an overloaded execute which takes a consistency
level argument. Would this work for your use case?

Patricio Echagüe

unread,
Apr 15, 2012, 3:03:30 PM4/15/12
to hector...@googlegroups.com
Nate, we should be able to use consistencyLevelPolicy.get(operationType, columnFamily) and for those CF that are not specified we should use the default CL. no?

Nate McCall

unread,
Apr 15, 2012, 8:45:56 PM4/15/12
to hector...@googlegroups.com
But the batch mutation is a single operation with a single consistency
which can consist of multiple individual mutations each against an
arbitrary column family. We'd have to scan the mutation list and break
it up.

2012/4/15 Patricio Echagüe <patr...@gmail.com>:

Patricio Echagüe

unread,
Apr 15, 2012, 8:50:51 PM4/15/12
to hector...@googlegroups.com

We can do it per mutator.add mutation() basis.

Sent from my Android

Elyran Kogan

unread,
Apr 16, 2012, 2:02:01 AM4/16/12
to hector-users
That is exactly what I need
this way when I do :
mutator.addInsertion(key, CF1,column)
mutator.addInsertion(key, CF2,column)
the consistency policy will be per insertion - per CF

thanks.

On Apr 16, 3:50 am, Patricio Echagüe <patric...@gmail.com> wrote:
> We can do it per mutator.add mutation() basis.
>
> Sent from my Android
> On Apr 15, 2012 5:45 PM, "Nate McCall" <zznat...@gmail.com> wrote:
>
>
>
>
>
>
>
> > But the batch mutation is a single operation with a single consistency
> > which can consist of multiple individual mutations each against an
> > arbitrary column family. We'd have to scan the mutation list and break
> > it up.
>
> > 2012/4/15 Patricio Echagüe <patric...@gmail.com>:
> > > Nate, we should be able to use consistencyLevelPolicy.get(operationType,
> > > columnFamily) and for those CF that are not specified we should use the
> > > default CL. no?
>
Reply all
Reply to author
Forward
0 new messages