colinmarc / impala-ruby

an impala client for ruby
MIT License
34 stars 22 forks source link

Receiving a Thrift::ApplicationException: "Invalid method name: 'executeAndWait'" #19

Closed NeMO84 closed 8 years ago

NeMO84 commented 9 years ago

Code

host = "localhost"
port = 21000
db = "impala_db"
impala = Impala.connect(host, port)
impala.execute("use #{db}") # <--- Causes the exception!

Stacktrace

/Users/nemo/.rvm/gems/ruby-2.1.0@project/gems/thrift-0.9.2.0/lib/thrift/client.rb:67:in handle_exception' /Users/nemo/.rvm/gems/ruby-2.1.0@project/gems/thrift-0.9.2.0/lib/thrift/client.rb:55:inreceive_message' /Users/nemo/.rvm/gems/ruby-2.1.0@project/gems/impala 0.4.3/lib/impala/protocol/beeswax_service.rb:43:in recv_executeAndWait' /Users/nemo/.rvm/gems/ruby-2.1.0@project/gems/impala 0.4.3/lib/impala/protocol/beeswax_service.rb:35:inexecuteAndWait' /Users/nemo/.rvm/gems/ruby-2.1.0@project/gems/impala-0.4.3/lib/impala/connection.rb:99:in send_query' /Users/nemo/.rvm/gems/ruby-2.1.0@project/gems/impala-0.4.3/lib/impala/connection.rb:74:inexecute'

Notes

Any help is appreciated!

ljank commented 8 years ago

@NeMO84 are you sure you're connecting to the right port? There are 2 Impala Frontend ports that are easy to mix:

The former one should be used to connect with thrift. Learned that the hard way :(

NeMO84 commented 8 years ago

Actually, I don't remember what I ended up doing. But I did get past the issue. Sorry, wish I could confirm or deny your question/suggestion.

Closing issue, thanks!