You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Anthony Ikeda <an...@gmail.com> on 2011/09/30 02:02:57 UTC

How can I check what the consistency level is?

We seem to be having issues with out Consistency policies. We have it
configured in Spring using the following:

    <bean id="consistencyLevelPolicy" class=
"me.prettyprint.cassandra.model.ConfigurableConsistencyLevel">

    <property name="defaultReadConsistencyLevel" value="LOCAL_QUORUM"/>

    <property name="defaultWriteConsistencyLevel" value="LOCAL_QUORUM"/>

    </bean>



    <bean id="keyspaceOperator" class=
"me.prettyprint.hector.api.factory.HFactory" factory-method="createKeyspace"
>

        <constructor-arg value="RegistryFoundation"/>

        <constructor-arg ref="cluster"/>

        <constructor-arg ref="consistencyLevelPolicy"/>

    </bean>

However, in our distributed testing, bringing down a single node will cause
the 'May not be enough replicas present to handle consistency level' error

I wanted to create a test to load the Spring config (above) and find out
what the consistency level is set to but there do not appear to be any
accessor methods to discover the value. Is there a way to output the
Consistency level to make sure that what we have configured is what is
actually being used?

Anthony

Re: How can I check what the consistency level is?

Posted by Anthony Ikeda <an...@gmail.com>.
Well I did a local test by debugging our code and the policy is set to
LOCAL_QUORUM. Is there something else I'm missing? More info that would
help? Or should I direct this to the hector-users group?

Anthony


On Thu, Sep 29, 2011 at 5:13 PM, Anthony Ikeda
<an...@gmail.com>wrote:

> RF=3
>
> 2 DC's
> 3 nodes each
>
>
>
> On Thu, Sep 29, 2011 at 5:08 PM, Paul Loy <ke...@gmail.com> wrote:
>
>> What is your replication factor?
>>
>>
>> On Thu, Sep 29, 2011 at 5:02 PM, Anthony Ikeda <
>> anthony.ikeda.dev@gmail.com> wrote:
>>
>>> We seem to be having issues with out Consistency policies. We have it
>>> configured in Spring using the following:
>>>
>>>      <bean id="consistencyLevelPolicy" class=
>>> "me.prettyprint.cassandra.model.ConfigurableConsistencyLevel">
>>>
>>>     <property name="defaultReadConsistencyLevel" value="LOCAL_QUORUM"/>
>>>
>>>     <property name="defaultWriteConsistencyLevel" value="LOCAL_QUORUM"/>
>>>
>>>     </bean>
>>>
>>>
>>>
>>>     <bean id="keyspaceOperator" class=
>>> "me.prettyprint.hector.api.factory.HFactory" factory-method=
>>> "createKeyspace">
>>>
>>>         <constructor-arg value="RegistryFoundation"/>
>>>
>>>         <constructor-arg ref="cluster"/>
>>>
>>>         <constructor-arg ref="consistencyLevelPolicy"/>
>>>
>>>     </bean>
>>>
>>> However, in our distributed testing, bringing down a single node will
>>> cause the 'May not be enough replicas present to handle consistency level'
>>> error
>>>
>>> I wanted to create a test to load the Spring config (above) and find out
>>> what the consistency level is set to but there do not appear to be any
>>> accessor methods to discover the value. Is there a way to output the
>>> Consistency level to make sure that what we have configured is what is
>>> actually being used?
>>>
>>> Anthony
>>>
>>>
>>
>>
>> --
>> ---------------------------------------------
>> Paul Loy
>> paul@keteracel.com
>> http://uk.linkedin.com/in/paulloy
>>
>
>

Re: How can I check what the consistency level is?

Posted by Anthony Ikeda <an...@gmail.com>.
RF=3

2 DC's
3 nodes each



On Thu, Sep 29, 2011 at 5:08 PM, Paul Loy <ke...@gmail.com> wrote:

> What is your replication factor?
>
>
> On Thu, Sep 29, 2011 at 5:02 PM, Anthony Ikeda <
> anthony.ikeda.dev@gmail.com> wrote:
>
>> We seem to be having issues with out Consistency policies. We have it
>> configured in Spring using the following:
>>
>>      <bean id="consistencyLevelPolicy" class=
>> "me.prettyprint.cassandra.model.ConfigurableConsistencyLevel">
>>
>>     <property name="defaultReadConsistencyLevel" value="LOCAL_QUORUM"/>
>>
>>     <property name="defaultWriteConsistencyLevel" value="LOCAL_QUORUM"/>
>>
>>     </bean>
>>
>>
>>
>>     <bean id="keyspaceOperator" class=
>> "me.prettyprint.hector.api.factory.HFactory" factory-method=
>> "createKeyspace">
>>
>>         <constructor-arg value="RegistryFoundation"/>
>>
>>         <constructor-arg ref="cluster"/>
>>
>>         <constructor-arg ref="consistencyLevelPolicy"/>
>>
>>     </bean>
>>
>> However, in our distributed testing, bringing down a single node will
>> cause the 'May not be enough replicas present to handle consistency level'
>> error
>>
>> I wanted to create a test to load the Spring config (above) and find out
>> what the consistency level is set to but there do not appear to be any
>> accessor methods to discover the value. Is there a way to output the
>> Consistency level to make sure that what we have configured is what is
>> actually being used?
>>
>> Anthony
>>
>>
>
>
> --
> ---------------------------------------------
> Paul Loy
> paul@keteracel.com
> http://uk.linkedin.com/in/paulloy
>

Re: How can I check what the consistency level is?

Posted by Paul Loy <ke...@gmail.com>.
What is your replication factor?

On Thu, Sep 29, 2011 at 5:02 PM, Anthony Ikeda
<an...@gmail.com>wrote:

> We seem to be having issues with out Consistency policies. We have it
> configured in Spring using the following:
>
>     <bean id="consistencyLevelPolicy" class=
> "me.prettyprint.cassandra.model.ConfigurableConsistencyLevel">
>
>     <property name="defaultReadConsistencyLevel" value="LOCAL_QUORUM"/>
>
>     <property name="defaultWriteConsistencyLevel" value="LOCAL_QUORUM"/>
>
>     </bean>
>
>
>
>     <bean id="keyspaceOperator" class=
> "me.prettyprint.hector.api.factory.HFactory" factory-method=
> "createKeyspace">
>
>         <constructor-arg value="RegistryFoundation"/>
>
>         <constructor-arg ref="cluster"/>
>
>         <constructor-arg ref="consistencyLevelPolicy"/>
>
>     </bean>
>
> However, in our distributed testing, bringing down a single node will cause
> the 'May not be enough replicas present to handle consistency level' error
>
> I wanted to create a test to load the Spring config (above) and find out
> what the consistency level is set to but there do not appear to be any
> accessor methods to discover the value. Is there a way to output the
> Consistency level to make sure that what we have configured is what is
> actually being used?
>
> Anthony
>
>


-- 
---------------------------------------------
Paul Loy
paul@keteracel.com
http://uk.linkedin.com/in/paulloy

Re: How can I check what the consistency level is?

Posted by aaron morton <aa...@thelastpickle.com>.
If you turn the server logging up to DEBUG you will see what CL the client is sending.
 
Cheers


-----------------
Aaron Morton
Freelance Cassandra Developer
@aaronmorton
http://www.thelastpickle.com

On 1/10/2011, at 3:43 AM, Ikeda Anthony wrote:

> We are using 0.8.6
> 
> 
> 
> On 29/09/2011, at 21:19 PM, Jonathan Ellis wrote:
> 
>> Are you on a current Cassandra release? If not you could be seeing
>> https://issues.apache.org/jira/browse/CASSANDRA-2870
>> 
>> On Thu, Sep 29, 2011 at 7:02 PM, Anthony Ikeda
>> <an...@gmail.com> wrote:
>>> We seem to be having issues with out Consistency policies. We have it
>>> configured in Spring using the following:
>>> 
>>>    <bean id="consistencyLevelPolicy"
>>> class="me.prettyprint.cassandra.model.ConfigurableConsistencyLevel">
>>> 
>>>    <property name="defaultReadConsistencyLevel" value="LOCAL_QUORUM"/>
>>> 
>>>    <property name="defaultWriteConsistencyLevel" value="LOCAL_QUORUM"/>
>>> 
>>>    </bean>
>>> 
>>> 
>>> 
>>>    <bean id="keyspaceOperator"
>>> class="me.prettyprint.hector.api.factory.HFactory"
>>> factory-method="createKeyspace">
>>> 
>>>        <constructor-arg value="RegistryFoundation"/>
>>> 
>>>        <constructor-arg ref="cluster"/>
>>> 
>>>        <constructor-arg ref="consistencyLevelPolicy"/>
>>> 
>>>    </bean>
>>> 
>>> However, in our distributed testing, bringing down a single node will cause
>>> the 'May not be enough replicas present to handle consistency level' error
>>> I wanted to create a test to load the Spring config (above) and find out
>>> what the consistency level is set to but there do not appear to be any
>>> accessor methods to discover the value. Is there a way to output the
>>> Consistency level to make sure that what we have configured is what is
>>> actually being used?
>>> Anthony
>>> 
>> 
>> 
>> 
>> -- 
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of DataStax, the source for professional Cassandra support
>> http://www.datastax.com
> 


Re: How can I check what the consistency level is?

Posted by Ikeda Anthony <an...@gmail.com>.
We are using 0.8.6



On 29/09/2011, at 21:19 PM, Jonathan Ellis wrote:

> Are you on a current Cassandra release? If not you could be seeing
> https://issues.apache.org/jira/browse/CASSANDRA-2870
> 
> On Thu, Sep 29, 2011 at 7:02 PM, Anthony Ikeda
> <an...@gmail.com> wrote:
>> We seem to be having issues with out Consistency policies. We have it
>> configured in Spring using the following:
>> 
>>     <bean id="consistencyLevelPolicy"
>> class="me.prettyprint.cassandra.model.ConfigurableConsistencyLevel">
>> 
>>     <property name="defaultReadConsistencyLevel" value="LOCAL_QUORUM"/>
>> 
>>     <property name="defaultWriteConsistencyLevel" value="LOCAL_QUORUM"/>
>> 
>>     </bean>
>> 
>> 
>> 
>>     <bean id="keyspaceOperator"
>> class="me.prettyprint.hector.api.factory.HFactory"
>> factory-method="createKeyspace">
>> 
>>         <constructor-arg value="RegistryFoundation"/>
>> 
>>         <constructor-arg ref="cluster"/>
>> 
>>         <constructor-arg ref="consistencyLevelPolicy"/>
>> 
>>     </bean>
>> 
>> However, in our distributed testing, bringing down a single node will cause
>> the 'May not be enough replicas present to handle consistency level' error
>> I wanted to create a test to load the Spring config (above) and find out
>> what the consistency level is set to but there do not appear to be any
>> accessor methods to discover the value. Is there a way to output the
>> Consistency level to make sure that what we have configured is what is
>> actually being used?
>> Anthony
>> 
> 
> 
> 
> -- 
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com


Re: How can I check what the consistency level is?

Posted by Jonathan Ellis <jb...@gmail.com>.
Are you on a current Cassandra release? If not you could be seeing
https://issues.apache.org/jira/browse/CASSANDRA-2870

On Thu, Sep 29, 2011 at 7:02 PM, Anthony Ikeda
<an...@gmail.com> wrote:
> We seem to be having issues with out Consistency policies. We have it
> configured in Spring using the following:
>
>     <bean id="consistencyLevelPolicy"
> class="me.prettyprint.cassandra.model.ConfigurableConsistencyLevel">
>
>     <property name="defaultReadConsistencyLevel" value="LOCAL_QUORUM"/>
>
>     <property name="defaultWriteConsistencyLevel" value="LOCAL_QUORUM"/>
>
>     </bean>
>
>
>
>     <bean id="keyspaceOperator"
> class="me.prettyprint.hector.api.factory.HFactory"
> factory-method="createKeyspace">
>
>         <constructor-arg value="RegistryFoundation"/>
>
>         <constructor-arg ref="cluster"/>
>
>         <constructor-arg ref="consistencyLevelPolicy"/>
>
>     </bean>
>
> However, in our distributed testing, bringing down a single node will cause
> the 'May not be enough replicas present to handle consistency level' error
> I wanted to create a test to load the Spring config (above) and find out
> what the consistency level is set to but there do not appear to be any
> accessor methods to discover the value. Is there a way to output the
> Consistency level to make sure that what we have configured is what is
> actually being used?
> Anthony
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com