cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabor Torok <Gabor.To...@sunpowercorp.com>
Subject RE: avro + cassandra + ruby
Date Thu, 30 Sep 2010 19:36:09 GMT
The ruby code creates a new http connection for each call to transceive. Here is what I changed
to make it work:

gabor$ diff /usr/local/lib/ruby/gems/1.8/gems/avro-1.4.0/lib/avro/ipc.rb ~/avro-trunk/lang/ruby/lib/avro/ipc.rb

518d517
<   require "net/http"
525d523
<       @conn = Net::HTTP.start host, port
531c529,531
<       resp = @conn.post('/', writer.to_s, {'Content-Type' => 'avro/binary'})
---
>       resp = Net::HTTP.start(host, port) do |http|
>         http.post('/', writer.to_s, {'Content-Type' => 'avro/binary'})
>       end

Thanks,
--Gabor

Mime
View raw message