You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this code in cassandra.rb does not respect the @servers parameter:
def new_client
thrift_client_class.new(CassandraThrift::Cassandra::Client, @servers, @thrift_client_options)
end
It seems to return a client which uses the default localhost value for @servers, which causes this to happen:
irb(main):005:0> cass = Cassandra.new(:OtherInbox,"10.208.130.191:9160")
=> #<Cassandra:77305550, @keyspace=:OtherInbox, @Schema={}, @servers=["10.208.130.191:9160"]>
irb(main):006:0> cass.instance_eval { @servers }
=> ["10.208.130.191:9160"]
irb(main):007:0> cass.get(:MerchantDomains,'example.com')
ThriftClient::NoServersAvailable: No live servers in ["127.0.0.1:9160"] since Wed Apr 07 14:11:45 +0000 2010.
from /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.4.1/lib/thrift_client/abstract_thrift_client.rb:124:in next_server' from /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.4.1/lib/thrift_client/abstract_thrift_client.rb:102:inconnect!'
from /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.4.1/lib/thrift_client/abstract_thrift_client.rb:183:in connect!' from /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.4.1/lib/thrift_client/abstract_thrift_client.rb:55:inproxy'
from /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.4.1/lib/thrift_client/abstract_thrift_client.rb:146:in proxy' from /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.4.1/lib/thrift_client/abstract_thrift_client.rb:49:inhandled_proxy'
from /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.4.1/lib/thrift_client/abstract_thrift_client.rb:142:in handled_proxy' from /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.4.1/lib/thrift_client/abstract_thrift_client.rb:23:inget_string_list_property'
from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/cassandra.rb:286:in check_keyspace' from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/cassandra.rb:282:inreconnect!'
from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/cassandra.rb:275:in client' from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/cassandra.rb:270:inschema'
from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/columns.rb:31:in column_family_property' from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/columns.rb:20:incolumn_name_class_for_key'
from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/columns.rb:12:in column_name_class' from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/helpers.rb:20:inextract_and_validate_params'
from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/cassandra.rb:197:in multi_get' from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/cassandra.rb:190:inget'
from (irb
irb(main):009:0> cass.instance_eval { @servers }
=> ["127.0.0.1:9160"]
I am working on a patch but dont' fully understand how the thrift client works; thought I'd post here first in case this is already known to you.
The text was updated successfully, but these errors were encountered:
I believe this code in cassandra.rb does not respect the @servers parameter:
def new_client
thrift_client_class.new(CassandraThrift::Cassandra::Client, @servers, @thrift_client_options)
end
It seems to return a client which uses the default localhost value for @servers, which causes this to happen:
irb(main):005:0> cass = Cassandra.new(:OtherInbox,"10.208.130.191:9160")
=> #<Cassandra:77305550, @keyspace=:OtherInbox, @Schema={}, @servers=["10.208.130.191:9160"]>
irb(main):006:0> cass.instance_eval { @servers }
=> ["10.208.130.191:9160"]
irb(main):007:0> cass.get(:MerchantDomains,'example.com')
ThriftClient::NoServersAvailable: No live servers in ["127.0.0.1:9160"] since Wed Apr 07 14:11:45 +0000 2010.
from /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.4.1/lib/thrift_client/abstract_thrift_client.rb:124:in
next_server' from /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.4.1/lib/thrift_client/abstract_thrift_client.rb:102:in
connect!'from /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.4.1/lib/thrift_client/abstract_thrift_client.rb:183:in
connect!' from /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.4.1/lib/thrift_client/abstract_thrift_client.rb:55:in
proxy'from /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.4.1/lib/thrift_client/abstract_thrift_client.rb:146:in
proxy' from /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.4.1/lib/thrift_client/abstract_thrift_client.rb:49:in
handled_proxy'from /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.4.1/lib/thrift_client/abstract_thrift_client.rb:142:in
handled_proxy' from /usr/local/lib/ruby/gems/1.8/gems/thrift_client-0.4.1/lib/thrift_client/abstract_thrift_client.rb:23:in
get_string_list_property'from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/cassandra.rb:286:in
check_keyspace' from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/cassandra.rb:282:in
reconnect!'from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/cassandra.rb:275:in
client' from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/cassandra.rb:270:in
schema'from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/columns.rb:31:in
column_family_property' from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/columns.rb:20:in
column_name_class_for_key'from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/columns.rb:12:in
column_name_class' from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/helpers.rb:20:in
extract_and_validate_params'from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/cassandra.rb:197:in
multi_get' from /usr/local/lib/ruby/gems/1.8/gems/cassandra-0.8.1/lib/cassandra/cassandra.rb:190:in
get'from (irb
irb(main):009:0> cass.instance_eval { @servers }
=> ["127.0.0.1:9160"]
I am working on a patch but dont' fully understand how the thrift client works; thought I'd post here first in case this is already known to you.
The text was updated successfully, but these errors were encountered: