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 15205D15C for ; Wed, 14 Nov 2012 21:22:27 +0000 (UTC) Received: (qmail 85530 invoked by uid 500); 14 Nov 2012 21:22:24 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 85498 invoked by uid 500); 14 Nov 2012 21:22:24 -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 85490 invoked by uid 99); 14 Nov 2012 21:22:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Nov 2012 21:22:24 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a42.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Nov 2012 21:22:16 +0000 Received: from homiemail-a42.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a42.g.dreamhost.com (Postfix) with ESMTP id 2181A68C05D for ; Wed, 14 Nov 2012 13:21:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :content-type:message-id:mime-version:subject:date:references:to :in-reply-to; s=thelastpickle.com; bh=e4vSQ/ceqznC/t7s42YdtA4oEX Q=; b=2cMYB3TTg2O/jQzuDqMFINaS+h+woTnWS2oMsKL6hYZ5Ld8Pu1dBHLmY8G cPbLwZKLrN5K9s/iULoNmn+V4CgOXSfJbna4hcZ41i9U+WLW/S/PCrAi4JedoQBO Wzq/yAVn/yKQRff6WOVkvGNgRT0aPkYE2arYJYv3fJZcMkQ90= Received: from [192.168.2.13] (unknown [116.90.132.105]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a42.g.dreamhost.com (Postfix) with ESMTPSA id 9D0DA68C05B for ; Wed, 14 Nov 2012 13:21:54 -0800 (PST) From: aaron morton Content-Type: multipart/alternative; boundary="Apple-Mail=_1805A00D-5B1D-4E91-BE72-1B6F31A15AA3" Message-Id: Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: SchemaDisagreementException Date: Thu, 15 Nov 2012 10:21:53 +1300 References: To: user@cassandra.apache.org In-Reply-To: X-Mailer: Apple Mail (2.1499) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_1805A00D-5B1D-4E91-BE72-1B6F31A15AA3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Out of interest why are you creating column families by making direct = calls on an embedded cassandra instance ? I would guess you life would = be easier if you defined a schema in CQL or CLI.=20 > I already read in the documentation that this error occurs when more = than one thread/processor access the same place in the Cassandra, but I = think this is not occuring. How may nodes do you have ? What version are you running ?=20 It sounds like you have run simultaneous schema updates and the global = schema has diverged.=20 If you can create your schema in CLI or CQL I would recommend doing = that.=20 If you are trying to do something more complicated you'll need to = provide more information.=20 Cheers ----------------- Aaron Morton Freelance Cassandra Developer New Zealand @aaronmorton http://www.thelastpickle.com On 15/11/2012, at 3:13 AM, Everton Lima wrote: > Some times, when I try to insert a data in Cassandra with Method: >=20 > static void createColumnFamily(String keySpace, String columnFamily){ > synchronized (mutex){ > Iface cs =3D new CassandraServer(); > CfDef cfDef =3D new CfDef(keySpace, columnFamily); > =20 > cfDef =3D cfDef.setComparator_type(comparator.toString()); > cfDef =3D cfDef.setKey_validation_class(UTF8Type.class.getName()); > cfDef =3D cfDef.setCaching("all"); > =20 > cs.set_keyspace(keySpace); > cs.system_add_column_family(cfDef); > } > } >=20 > I run this method in only on process of the distributor system. But in = this process, I run the method two times consecutive in the same thread, = but with keyspace diferent. > I already read in the documentation that this error occurs when more = than one thread/processor access the same place in the Cassandra, but I = think this is not occuring. > Some one cold help me to understand this problem? >=20 > Thanks. >=20 > --=20 >=20 > Everton Lima Aleixo > Bacharel em Ciencia da Computa=E7=E3o > Universidade Federal de Goi=E1s --Apple-Mail=_1805A00D-5B1D-4E91-BE72-1B6F31A15AA3 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 Out = of interest why are you creating column families by making direct calls = on an embedded cassandra instance ? I would guess you life would be = easier if you defined a schema in CQL or = CLI. 


I = already read in the documentation that this error occurs when more than = one thread/processor access the same place in the Cassandra, but I think = this is not occuring.
How may nodes do you have = ?
What version are you running ? 
It sounds = like you have run simultaneous schema updates and the global schema has = diverged. 

If you can create your schema = in CLI or CQL I would recommend doing that. 
If you are = trying to do something more complicated you'll need to provide more = information. 

Cheers


http://www.thelastpickle.com

On 15/11/2012, at 3:13 AM, Everton Lima <peitin.inutil@gmail.com> = wrote:

Some times, when I try to insert a data in Cassandra with = Method:

static void createColumnFamily(String keySpace, String = columnFamily){
 synchronized (mutex){
  Iface cs =3D new = CassandraServer();
  CfDef cfDef =3D new CfDef(keySpace, = columnFamily);
       
  cfDef =3D = cfDef.setComparator_type(comparator.toString());
  cfDef =3D = cfDef.setKey_validation_class(UTF8Type.class.getName());
  cfDef = =3D cfDef.setCaching("all");
        =            
  = cs.set_keyspace(keySpace);
  cs.system_add_column_family(cfDef);
 }
}

I run = this method in only on process of the distributor system. But in this = process, I run the method two times consecutive in the same thread, but = with keyspace diferent.
I already read in the documentation that this error occurs when more = than one thread/processor access the same place in the Cassandra, but I = think this is not occuring.
Some one cold help me to understand this = problem?

Thanks.

--

Everton Lima = Aleixo
Bacharel em Ciencia da Computa=E7=E3o
Universidade Federal = de Goi=E1s

= --Apple-Mail=_1805A00D-5B1D-4E91-BE72-1B6F31A15AA3--