Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 76ADB9FB6 for ; Sun, 18 Mar 2012 07:58:44 +0000 (UTC) Received: (qmail 61341 invoked by uid 500); 18 Mar 2012 07:58:40 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 60745 invoked by uid 500); 18 Mar 2012 07:58:39 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 60715 invoked by uid 500); 18 Mar 2012 07:58:39 -0000 Delivered-To: apmail-incubator-cassandra-user@incubator.apache.org Received: (qmail 60704 invoked by uid 99); 18 Mar 2012 07:58:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Mar 2012 07:58:38 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_FRT_BELOW2 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of watanabe.maki@gmail.com designates 209.85.210.47 as permitted sender) Received: from [209.85.210.47] (HELO mail-pz0-f47.google.com) (209.85.210.47) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Mar 2012 07:58:32 +0000 Received: by dado14 with SMTP id o14so8615532dad.6 for ; Sun, 18 Mar 2012 00:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; bh=m89UYFKZPfe8OxaU0m3SqgZeXiwySrUTjwxt+oRaMoo=; b=QvrMzMzvjLw16/u17dsy+VGz7tgqJTNvLBAdU4x6MkcbXcQrq0WasPTpE87JOrZTIX pDwrazse9EqTY4aG90uAuUd5BNRdX4xp2fxjpVaRDS6FtsPd3D0gg9zhVg5sXKUuChJk u8olA0ZhDtZ5TH0faYoS/J2O4/Tw5d3nOWABTP5OwdQIoQ9N/mkp9/ya0NOOOC5T8aDh GloT0dWlAZwFwmsD77SDlGmokIJFuVGBBsioF9CyJ+54CJr/cZnq4ryddYaYnUtRPizq dT9/2yICmMkTdeksKYBrMaiFhe5h1wMrY+TS2JCR7+jDjTuF1nsfYYNbjBc2WGlGQ8oD j7WA== Received: by 10.68.241.201 with SMTP id wk9mr18378146pbc.136.1332057492040; Sun, 18 Mar 2012 00:58:12 -0700 (PDT) Received: from [10.135.109.83] (pw126210061181.5.kyb.panda-world.ne.jp. [126.210.61.181]) by mx.google.com with ESMTPS id p9sm8427637pbb.9.2012.03.18.00.58.05 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 18 Mar 2012 00:58:11 -0700 (PDT) References: In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: 7bit Content-Type: multipart/alternative; boundary=Apple-Mail-1AD82B19-59F3-4856-A7B5-0C067E5490DD Message-Id: Cc: "cassandra-user@incubator.apache.org" X-Mailer: iPhone Mail (9B176) From: Watanabe Maki Subject: Re: consistency level question Date: Sun, 18 Mar 2012 16:57:50 +0900 To: "user@cassandra.apache.org" X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-1AD82B19-59F3-4856-A7B5-0C067E5490DD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Because your RF is 1, so you need all nodes up. maki On 2012/03/18, at 16:15, Tamar Fraenkel wrote: > Hi! > I have a 3 node cassandra cluster. > I use Hector API. >=20 > I give hecotr one of the node's IP address > I call setAutoDiscoverHosts(true) and setRunAutoDiscoveryAtStartup(true). >=20 > The describe on one node returns: >=20 > Replication Strategy: org.apache.cassandra.locator.SimpleStrategy > Durable Writes: true > Options: [replication_factor:1] >=20 > The odd thing is that when I take one of the nodes down, expecting all to c= ontinue 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 r= ead and write resumes. >=20 > Any idea or explanation why this is the case? > Thanks! >=20 >=20 > me.prettyprint.hector.api.exceptions.HUnavailableException: : May not be e= nough replicas present to handle consistency level. > at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.trans= late(ExceptionsTranslatorImpl.java:66) > at me.prettyprint.cassandra.service.KeyspaceServiceImpl$7.execute(= KeyspaceServiceImpl.java:285) > at me.prettyprint.cassandra.service.KeyspaceServiceImpl$7.execute(= KeyspaceServiceImpl.java:268) > at me.prettyprint.cassandra.service.Operation.executeAndSetResult(= Operation.java:103) > at me.prettyprint.cassandra.connection.HConnectionManager.operateW= ithFailover(HConnectionManager.java:246) > at me.prettyprint.cassandra.service.KeyspaceServiceImpl.operateWit= hFailover(KeyspaceServiceImpl.java:131) > at me.prettyprint.cassandra.service.KeyspaceServiceImpl.getSlice(K= eyspaceServiceImpl.java:289) > at me.prettyprint.cassandra.model.thrift.ThriftSliceQuery$1.doInKe= yspace(ThriftSliceQuery.java:53) > at me.prettyprint.cassandra.model.thrift.ThriftSliceQuery$1.doInKe= yspace(ThriftSliceQuery.java:49) > at me.prettyprint.cassandra.model.KeyspaceOperationCallback.doInKe= yspaceAndMeasure(KeyspaceOperationCallback.java:20) > at me.prettyprint.cassandra.model.ExecutingKeyspace.doExecute(Exec= utingKeyspace.java:85) > at me.prettyprint.cassandra.model.thrift.ThriftSliceQuery.execute(= ThriftSliceQuery.java:48) > at me.prettyprint.cassandra.service.ColumnSliceIterator.hasNext(Co= lumnSliceIterator.java:60) > at=20 >=20 >=20 > Tamar Fraenkel=20 > Senior Software Engineer, TOK Media=20 >=20 > >=20 > tamar@tok-media.com > Tel: +972 2 6409736=20 > Mob: +972 54 8356490=20 > Fax: +972 2 5612956=20 >=20 >=20 >=20 --Apple-Mail-1AD82B19-59F3-4856-A7B5-0C067E5490DD Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=utf-8
Because your RF is 1, so you need all nodes up.

maki


On 2012/03/18, at 16:15, Tamar Fraenkel <tamar@tok-media.com> wrote:

Hi!
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?
Thanks!


me.prettyprint.hector.api.exceptions.HUnavailableException: : May not be enough replicas present to handle consistency level.
        at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:66)
        at me.prettyprint.cassandra.service.KeyspaceServiceImpl$7.execute(KeyspaceServiceImpl.java:285)
        at me.prettyprint.cassandra.service.KeyspaceServiceImpl$7.execute(KeyspaceServiceImpl.java:268)
        at me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:103)
        at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:246)
        at me.prettyprint.cassandra.service.KeyspaceServiceImpl.operateWithFailover(KeyspaceServiceImpl.java:131)
        at me.prettyprint.cassandra.service.KeyspaceServiceImpl.getSlice(KeyspaceServiceImpl.java:289)
        at me.prettyprint.cassandra.model.thrift.ThriftSliceQuery$1.doInKeyspace(ThriftSliceQuery.java:53)
        at me.prettyprint.cassandra.model.thrift.ThriftSliceQuery$1.doInKeyspace(ThriftSliceQuery.java:49)
        at me.prettyprint.cassandra.model.KeyspaceOperationCallback.doInKeyspaceAndMeasure(KeyspaceOperationCallback.java:20)
        at me.prettyprint.cassandra.model.ExecutingKeyspace.doExecute(ExecutingKeyspace.java:85)
        at me.prettyprint.cassandra.model.thrift.ThriftSliceQuery.execute(ThriftSliceQuery.java:48)
        at me.prettyprint.cassandra.service.ColumnSliceIterator.hasNext(ColumnSliceIterator.java:60)
        at 


Tamar Fraenkel 
Senior Software Engineer, TOK Media 

<tokLogo.png>



--Apple-Mail-1AD82B19-59F3-4856-A7B5-0C067E5490DD--