cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Caleb Rackliffe <>
Subject Re: consistency level question
Date Sun, 18 Mar 2012 16:08:17 GMT
That sounds right to me :)

Caleb Rackliffe | Software Developer
M 949.981.0159 |

From: Tamar Fraenkel <<>>
Reply-To: "<>" <<>>
Date: Sun, 18 Mar 2012 04:20:58 -0400
To: "<>" <<>>
Subject: Re: consistency level question

I updated replication factor to 2, and now when I took one node down all continued running
(I did see Hector complaining on the node being down), but things were saved to db and read
from it.

Just so I understand, now, having replication factor of 2, if I have 2 out of 3 nodes running
all my read and writes with CL=1 should work, right?

Tamar Fraenkel
Senior Software Engineer, TOK Media

Tel:   +972 2 6409736
Mob:  +972 54 8356490
Fax:   +972 2 5612956

On Sun, Mar 18, 2012 at 9:57 AM, Watanabe Maki <<>>
Because your RF is 1, so you need all nodes up.


On 2012/03/18, at 16:15, Tamar Fraenkel <<>>

I have a 3 node cassandra cluster.
I use Hector API.

I give hecotr one of the node's IP address
I call setAutoDiscoverHosts(true) and setRunAutoDiscoveryAtStartup(true).

The describe on one node returns:

Replication Strategy: org.apache.cassandra.locator.SimpleStrategy
  Durable Writes: true
    Options: [replication_factor:1]

The odd thing is that when I take one of the nodes down, expecting all to continue running
smoothly, I get exceptions of the format seen bellow, and no read or write succeeds. When
I bring the node back up, exceptions stop and read and write resumes.

Any idea or explanation why this is the case?

me.prettyprint.hector.api.exceptions.HUnavailableException: : May not be enough replicas present
to handle consistency level.
        at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(
        at me.prettyprint.cassandra.service.KeyspaceServiceImpl$7.execute(
        at me.prettyprint.cassandra.service.KeyspaceServiceImpl$7.execute(
        at me.prettyprint.cassandra.service.Operation.executeAndSetResult(
        at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(
        at me.prettyprint.cassandra.service.KeyspaceServiceImpl.operateWithFailover(
        at me.prettyprint.cassandra.service.KeyspaceServiceImpl.getSlice(
        at me.prettyprint.cassandra.model.thrift.ThriftSliceQuery$1.doInKeyspace(
        at me.prettyprint.cassandra.model.thrift.ThriftSliceQuery$1.doInKeyspace(
        at me.prettyprint.cassandra.model.KeyspaceOperationCallback.doInKeyspaceAndMeasure(
        at me.prettyprint.cassandra.model.ExecutingKeyspace.doExecute(
        at me.prettyprint.cassandra.model.thrift.ThriftSliceQuery.execute(
        at me.prettyprint.cassandra.service.ColumnSliceIterator.hasNext(

Tamar Fraenkel
Senior Software Engineer, TOK Media

Tel:   +972 2 6409736
Mob:  +972 54 8356490
Fax:   +972 2 5612956

View raw message