incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alta...@ceid.upatras.gr
Subject Help with creating a thrift call
Date Wed, 13 Oct 2010 13:21:45 GMT
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

Mime
View raw message