Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 82676 invoked from network); 12 Oct 2010 02:48:48 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Oct 2010 02:48:48 -0000 Received: (qmail 83304 invoked by uid 500); 12 Oct 2010 02:48:46 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 83248 invoked by uid 500); 12 Oct 2010 02:48:46 -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 83234 invoked by uid 99); 12 Oct 2010 02:48:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Oct 2010 02:48:46 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bburruss@real.com designates 207.188.23.4 as permitted sender) Received: from [207.188.23.4] (HELO kal-el.real.com) (207.188.23.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Oct 2010 02:48:38 +0000 Received: from seacas01.corp.real.com ([::ffff:192.168.139.56]) (TLS: TLSv1/SSLv3,128bits,AES128-SHA) by kal-el.real.com with esmtp; Mon, 11 Oct 2010 19:48:16 -0700 id 0008096D.4CB3CC70.000019E6 Received: from [192.168.1.6] (192.168.198.6) by seacas01.corp.real.com (192.168.139.56) with Microsoft SMTP Server id 8.2.254.0; Mon, 11 Oct 2010 19:48:16 -0700 Message-ID: <4CB3CC70.9010207@real.com> Date: Mon, 11 Oct 2010 19:48:16 -0700 From: "B. Todd Burruss" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100922 Thunderbird/3.1.4 MIME-Version: 1.0 To: "user@cassandra.apache.org" Subject: Re: getSchemaVersion References: <4CB3B17D.9060403@real.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Old-Return-Path: bburruss@real.com X-Virus-Checked: Checked by ClamAV on apache.org On 10/11/2010 06:14 PM, Jonathan Ellis wrote: > On Mon, Oct 11, 2010 at 7:53 PM, B. Todd Burruss wrote: >> to determine if my programmatic schema changes have been distributed >> throughout the cluster, I am supposed to use getSchemaVersionMap, correct? >> >> my question is how do I properly use it? I have the schema version returned >> from the thrift method, and I can lookup in the schema map returned >> getSchemaVersionMap, but i'm not sure the proper way to interpret results. >> >> do i wait until getSchemaVersionMap has an entry for the version in question >> that contains all the nodes in my cluster? > Yes. > >> if this is the case, then i'm having trouble getting the number of nodes if >> i have never created a keyspace. with no keyspace i can't ask for the ring, >> in which case i can't count the number of nodes. > Each node can only have one active version, so the converse of "my new > version has all the nodes in the cluster" is "there are no other > versions present in the map." > i was actually doing this to start with and was worried that i could have two clients modifying schemas at the same time. it seems this could cause multiple valid versions and a race condition. maybe it simply "works out" that i wait until only one version is in the map, *if* get the version map from the same host that i used to modify the schema? does this make sense?