cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "B. Todd Burruss" <>
Subject Re: getSchemaVersion
Date Tue, 12 Oct 2010 02:48:16 GMT

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 

does this make sense?

View raw message