From cassandra-user-return-1759-apmail-incubator-cassandra-user-archive=incubator.apache.org@incubator.apache.org Fri Dec 11 04:27:11 2009 Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 45106 invoked from network); 11 Dec 2009 04:27:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Dec 2009 04:27:11 -0000 Received: (qmail 88814 invoked by uid 500); 11 Dec 2009 04:27:11 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 88726 invoked by uid 500); 11 Dec 2009 04:27:09 -0000 Mailing-List: contact cassandra-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-user@incubator.apache.org Delivered-To: mailing list cassandra-user@incubator.apache.org Received: (qmail 88715 invoked by uid 99); 11 Dec 2009 04:27:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Dec 2009 04:27:09 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of osullivan.padraig@gmail.com designates 209.85.217.227 as permitted sender) Received: from [209.85.217.227] (HELO mail-gx0-f227.google.com) (209.85.217.227) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Dec 2009 04:27:00 +0000 Received: by gxk27 with SMTP id 27so457963gxk.7 for ; Thu, 10 Dec 2009 20:26:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=Go8rJhmeV7V+IcxnXdLRadQT/CEGzgYKaflRdAQAhO0=; b=RudGF2sacl4Nx1kJAUn0Wui3iAH8LsIb6s5FQTBBLlG92zYRo0UhkzgrhTJzdC67yi k+w00caUET+q4dZw2+68aBn5pSpa1wcgm273p8fxIEAQMCnuBlM80Pf+uPofJitmKNJ4 /9PPvol7yk9VhlQbkjgmAG1KA5u5L3Ll2NHw8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Nr+AF2cNl9+Iv2rzNnKTPKZB2mBGpYdMjxU8HZKvafi5bTd2mB6T6MXHQDPoA1jkYM gxyPqbDpciTIG/4yatIRdz8D+fr4hGvIAjdM7te26MkSthkngtI0wH2WTb7ihfrOe8Kk 0idM4uHZlnvK9cAcEZwGRdpoEq9aEDAslbPH8= MIME-Version: 1.0 Received: by 10.151.33.1 with SMTP id l1mr1745558ybj.10.1260505599920; Thu, 10 Dec 2009 20:26:39 -0800 (PST) Date: Thu, 10 Dec 2009 23:26:39 -0500 Message-ID: Subject: C++ Interface Issues From: "Padraig O'Sullivan" To: cassandra-user@incubator.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Hi! I was curious if anyone has had success using the C++ interface to Cassandra? I've been having some difficulties and just wanted to check if I was doing something wrong before debugging further or if there was any known issues with C++ interface. I have a simple test program to demonstrate my issue (headers and using namespace declarations omitted for clarity): int main() { shared_ptr socket(new TSocket(host, port)); shared_ptr transport(new TBufferedTransport(socket)); shared_ptr protocol(new TBinaryProtocol(transport)); CassandraClient client(protocol); try { transport->open(); ColumnPath old_col; old_col.column_family.assign("Data"); old_col.super_column.assign(""); old_col.column.assign("first"); ColumnOrSuperColumn ret_val; client.get(ret_val, "drizzle", "padraig", old_col, ZERO); transport->close(); } catch (InvalidRequestException &re) { printf("ERROR: %s\n", re.why.c_str()); } catch (TException &tx) { printf("ERROR: %s\n", tx.what()); } } Now, when I run this, I get the following (from the InvalidRequestException): $ ./simple_get ERROR: column parameter is not optional for standard CF Data $ When I look at the relevant piece of code in the method validateColumnPath() in ThriftValidation.java, I see the following: if (column_path.column == null) { throw new InvalidRequestException("column parameter is not optional for standard CF " + column_path.column_family); } and I can confirm that the super_column and column members of the ColumnPath object are appearing as null strings in this method but the column parameter is not being passed as a null parameter from my C++ program. So basically, I'm just wondering if anyone has successfully used the C++ interface generated by thrift to Cassandra? Are there any issues with it that I am not aware of? Has anyone else encountered this problem? I should mention that I checked out the latest version of thrift from SVN and used that to generate the C++ files for interfacing with cassandra and I used git to clone the latest version of Cassandra (the output of show version from the CLI shows the Cassandra version as 0.5-beta1). Thanks, Padraig