colinmarc / impala-ruby

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

issue while connection to impala #16

Closed ghost closed 8 years ago

ghost commented 10 years ago

Thrift::ApplicationException: Thrift::ApplicationException from /home/sivasankart/.rvm/gems/ruby-1.9.3-p362@xyz/gems/thrift-0.9.1/lib/thrift/client.rb:58:in `handle_exception'

Hai im getting an exception while connection to Impala. Can anyone please guide me on this?

colinmarc commented 10 years ago

Hi! I'm not sure how to reproduce this. What version of impala are you connecting to?

ghost commented 10 years ago

Hi colinmarc,

Im using Impala 1.3.1.

when i run conn=Impala.connect('xxx.xxx.com', 21050), it returns a connection object in ruby Impala::Connection bigd.pointmatter.com:21050 when i run conn.execute('SELECT * from xxx')

Thrift::ApplicationException: Thrift::ApplicationException from /home/sivasankart/.rvm/gems/ruby-1.9.3-p362@xyz/gems/thrift-0.9.1/lib/thrift/client.rb:58:in handle_exception' from /home/sivasankart/.rvm/gems/ruby-1.9.3-p362@xyz/gems/thrift-0.9.1/lib/thrift/client.rb:46:inreceive_message' from /home/sivasankart/.rvm/gems/ruby-1.9.3-p362@xyz/gems/impala-0.4.3/lib/impala/protocol/beeswax_service.rb:43:in recv_executeAndWait' from /home/sivasankart/.rvm/gems/ruby-1.9.3-p362@xyz/gems/impala-0.4.3/lib/impala/protocol/beeswax_service.rb:35:inexecuteAndWait' from /home/sivasankart/.rvm/gems/ruby-1.9.3-p362@xyz/gems/impala-0.4.3/lib/impala/connection.rb:99:in send_query' from /home/sivasankart/.rvm/gems/ruby-1.9.3-p362@xyz/gems/impala-0.4.3/lib/impala/connection.rb:74:inexecute' from (irb):16 from /home/sivasankart/.rvm/gems/ruby-1.9.3-p362@xyz/gems/railties-3.2.9/lib/rails/commands/console.rb:47:in start' from /home/sivasankart/.rvm/gems/ruby-1.9.3-p362@xyz/gems/railties-3.2.9/lib/rails/commands/console.rb:8:instart' from /home/sivasankart/.rvm/gems/ruby-1.9.3-p362@xyz/gems/railties-3.2.9/lib/rails/commands.rb:41:in <top (required)>' from script/rails:6:inrequire' from script/rails:6:in `

'

colinmarc commented 9 years ago

It looks like you're connecting to the Hiveserver2/jdbc port, not the impala port (which defaults to 21000). Might that be the problem?