cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian van der Leeden <christian.vanderlee...@googlemail.com>
Subject Re: Avro API on cassandra trunk with ruby
Date Tue, 29 Jun 2010 15:50:36 GMT
Thanks, this works now.

Christian

On Jun 29, 2010, at 5:26 PM, Eric Evans wrote:

> On Tue, 2010-06-29 at 13:10 +0200, Christian van der Leeden wrote:
>>        just trying to talk to cassandra-trunk (0.7) via avro on ruby.
>> Started the server with ./bin/cassandra -a -f. The connection 
>> code is here: http://pastie.org/1023158
> 
> Cassandra uses the HTTP transport (for now anyway), but you're using a
> socket transport. I think you want something more like:
> 
> def make_requestor()
>  transport = Avro::IPC::HTTPTransceiver.new("localhost", 9160)
>  Avro::IPC::Requestor.new(CASSANDRA_PROTOCOL, transport)
> end
> 
> See lang/ruby/test/sample_ipc_http_client.rb in Avro's source.
> 
>> The problem is that the server says:
>> DEBUG 12:54:44,205 EXCEPTION 
>> HttpException(400,null,null)
>>        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:361)
>>        at
>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>>        at
>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
>>        at org.mortbay.jetty.bio.SocketConnector
>> $Connection.run(SocketConnector.java:228)
>>        at org.mortbay.thread.QueuedThreadPool
>> $PoolThread.run(QueuedThreadPool.java:582) 
> -- 
> Eric Evans
> eevans@rackspace.com
> 


Mime
View raw message