Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 816 invoked from network); 28 Sep 2010 23:06:29 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Sep 2010 23:06:29 -0000 Received: (qmail 63705 invoked by uid 500); 28 Sep 2010 23:06:28 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 63661 invoked by uid 500); 28 Sep 2010 23:06:27 -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 63653 invoked by uid 99); 28 Sep 2010 23:06:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 23:06:27 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of prvs=0887410415=Gabor.Torok@sunpowercorp.com designates 63.146.67.32 as permitted sender) Received: from [63.146.67.32] (HELO mailspna01.sunpowercorp.com) (63.146.67.32) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 23:06:21 +0000 From: Gabor Torok To: "user@cassandra.apache.org" Date: Tue, 28 Sep 2010 16:06:02 -0700 Subject: avro + cassandra + ruby Thread-Topic: avro + cassandra + ruby Thread-Index: AQHLX2G4qmAj+vzxMUuvBcX6qnWyAg== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Received-SPF: none Hi, I'm attempting to use avro to talk to cassandra because the ruby thrift cli= ent's read performance is pretty bad (I measured 4x slower than java). However, I run into a problem when calling multiget_slice.=20 The server gives a KeyspaceNotDefinedException because clientState.getKeysp= ace() returns null. It seems this is because ClientState stores the keyspace in a ThreadLocal. I call set_keyspace and clientState stores the keyspace value. I guess the = next avro call to multiget_slice runs in a different thread so it can't ret= rieve the value. In ruby, I use Avro::IPC::HTTPTransceiver as the transport which I believe = is a stateless transport. I also tried SocketTransport, but that died with = a malloc exception. Is this a problem with the ruby avro library (I use avro 1.4.0), or how the= server handles avro threads? Any help would be appreciated! Thanks, --Gabor