Return-Path: Delivered-To: apmail-cassandra-dev-archive@www.apache.org Received: (qmail 43116 invoked from network); 13 Oct 2010 13:22:24 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Oct 2010 13:22:24 -0000 Received: (qmail 34504 invoked by uid 500); 13 Oct 2010 13:22:23 -0000 Delivered-To: apmail-cassandra-dev-archive@cassandra.apache.org Received: (qmail 34288 invoked by uid 500); 13 Oct 2010 13:22:20 -0000 Mailing-List: contact dev-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list dev@cassandra.apache.org Received: (qmail 34280 invoked by uid 99); 13 Oct 2010 13:22:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Oct 2010 13:22:19 +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: local policy) Received: from [150.140.141.169] (HELO poseidon.ceid.upatras.gr) (150.140.141.169) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Oct 2010 13:22:10 +0000 Received: from mail.ceid.upatras.gr (unknown [10.1.0.143]) by poseidon.ceid.upatras.gr (Postfix) with ESMTP id 5AF57EB4B17 for ; Wed, 13 Oct 2010 16:21:46 +0300 (EEST) Received: from localhost (europa.ceid.upatras.gr [127.0.0.1]) by mail.ceid.upatras.gr (Postfix) with ESMTP id 3E75616013A for ; Wed, 13 Oct 2010 16:21:46 +0300 (EEST) X-Virus-Scanned: amavisd-new at ceid.upatras.gr Received: from mail.ceid.upatras.gr ([127.0.0.1]) by localhost (europa.ceid.upatras.gr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E3y5YP1LCwVf for ; Wed, 13 Oct 2010 16:21:46 +0300 (EEST) Received: by mail.ceid.upatras.gr (Postfix, from userid 48) id 15A1B16013D; Wed, 13 Oct 2010 16:21:45 +0300 (EEST) Received: from 150.140.193.14 by webmail.ceid.upatras.gr with HTTP; Wed, 13 Oct 2010 16:21:45 +0300 (EEST) Message-ID: <54431.150.140.193.14.1286976105.squirrel@webmail.ceid.upatras.gr> Date: Wed, 13 Oct 2010 16:21:45 +0300 (EEST) Subject: Help with creating a thrift call From: altanis@ceid.upatras.gr To: dev@cassandra.apache.org User-Agent: SquirrelMail/1.4.8-5.el5_3.7 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal I want to create a thrift call and would like to know how to go about it. I think what I should do is this: - add my call to cassandra.thrift (eg. string test(1:required string arg), within 'service Cassandra') - run thrift -gen java cassandra.thrift - write a corresponding function in service/CassandraServer.java, (eg.: public String test(String arg) throws TException { logger.debug("argument is "+arg); return "Yay!"; } ) - run ant on the whole project Now I should be able to write a client that uses this command. Am I wrong? I have tried all this, by copying the examples from ThriftExamples on the wiki, but 1) they seem to be working with older Cassandra versions ( I am using 0.7 beta1), 2) I seem to be doing something wrong as I get a org.apache.thrift.transport.TTransportException when trying even describe_cluster_name(). Any help will be appreciated. Please ask for any clarifications. Alexander