Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 63455 invoked from network); 3 Mar 2011 22:09:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Mar 2011 22:09:34 -0000 Received: (qmail 76799 invoked by uid 500); 3 Mar 2011 22:09:32 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 76759 invoked by uid 500); 3 Mar 2011 22:09:32 -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 76750 invoked by uid 99); 3 Mar 2011 22:09:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Mar 2011 22:09:32 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of s5alye@gmail.com designates 209.85.210.172 as permitted sender) Received: from [209.85.210.172] (HELO mail-iy0-f172.google.com) (209.85.210.172) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Mar 2011 22:09:26 +0000 Received: by iyj8 with SMTP id 8so1576508iyj.31 for ; Thu, 03 Mar 2011 14:09:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=7ejtLo1i9brnyfMmOCVXNvf9SNsywamvvnqTYhjMsdU=; b=PVJQXg2Ba4D0dLlB+nmsOJReHgPGmiEZRi46jEz+7jqaD1bTEdjsUtuS3UfRCKEVLR IcB4LF9/tO2n0HWuqz0Vfj8p9DlTuFfR3Unom8DObqsAEwwFbSMP6zXNzqA0DWMANVHx 5ZQTkoco5NkEsufX/qaVujpkeJTKksTy4kdSw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=QxSZu+YXGwyPYaI3QsyGpBOxZV+rGIvilbNCBNFO7XWg0iju/eiK+JJNJss5yJIQ5h uzPRKoFPQOIKOGXPJC5Vy/EgHWkydqesFsAGHoSJGKSeACLD8jAXymqc8HsiNoJJO1Fl terZKTWWQkJ9REY1AAlq4AzoXimLf8+4zMc88= MIME-Version: 1.0 Received: by 10.42.227.2 with SMTP id iy2mr2213619icb.405.1299190145584; Thu, 03 Mar 2011 14:09:05 -0800 (PST) Received: by 10.231.12.1 with HTTP; Thu, 3 Mar 2011 14:09:05 -0800 (PST) In-Reply-To: References: Date: Thu, 3 Mar 2011 17:09:05 -0500 Message-ID: Subject: Re: Network Topology Strategy error From: A J To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Thanks. It worked when I changed as you suggested to: create keyspace ks1 with strategy_options = [{DC1:1, DC2:1}] and placement_strategy='org.apache.cassandra.locator.NetworkTopologyStrategy'; Something that I am observing: The replicas are always put in the first node on the other DC. (So if there are 2 nodes in each DC, replica of both nodes goes to the first node in the other DC. And vice-versa) This would make the first node in each DC a hotspot. Am I doing something wrong ? If not, any way to avoid this ? On Thu, Mar 3, 2011 at 3:41 PM, Jonathan Ellis wrote: > you need to specify per-DC replicas w/ NTS in strategy_options, > instead of using replication_factor > > On Thu, Mar 3, 2011 at 1:52 PM, A J wrote: >> using latest cassandra (0.7.2). I want to try out Network Topology Strategy. >> >> Following is related setting in cassandra.yaml >> endpoint_snitch: org.apache.cassandra.locator.PropertyFileSnitch >> >> I have four nodes. Set them accordingly in ./conf/cassandra-topology.properties: >> 10.252.219.224=DC2:RAC1 >> 10.252.10.64=DC2:RAC1 >> 10.252.11.32=DC1:RAC1 >> 10.220.103.98=DC1:RAC1 >> >> >> I create a ks as: >> create keyspace ks1 with replication_factor=1 and >> placement_strategy='org.apache.cassandra.locator.NetworkTopologyStrategy'; >> >> When I try to insert, get the following error: >> set cf1['A']['c1']='xyz'; >> ERROR 19:21:58,081 Internal error processing insert >> java.lang.AssertionError: invalid response count 1 for replication factor 0 >> >> >> Please suggest what could be going on ? cassandra-topology.properties >> has two DCs. Why am I still getting the error ? >> >> Thanks for any suggestions. >> > > > > -- > Jonathan Ellis > Project Chair, Apache Cassandra > co-founder of DataStax, the source for professional Cassandra support > http://www.datastax.com >