forward3d / rbhive

Ruby gem for querying Apache Hive
http://www.forward3d.com
MIT License
98 stars 75 forks source link

Thrift::TransportException: Broken pipe #45

Open dheenaINDIAN opened 8 years ago

dheenaINDIAN commented 8 years ago

Hi I have installed Hadoop, Hive, added gem rbhive While executing,

RBHive.tcli_connect("localhost", 9998, {:hive_version => :cdh5, :transport => :sasl, :sasl_params => {} }) do |connection|
connection.fetch('SHOW TABLES')
end

I am getting Error

Initializing transport sasl
Connecting to HiveServer2 localhost on port 9998
Thrift::TransportException: Broken pipe
    from /home/dheena/.rvm/gems/ruby-2.2.2/gems/thrift-0.9.3.0/lib/thrift/transport/socket.rb:90:in `rescue in write'
lloydpick commented 8 years ago

Are you actually using SASL auth? Have you tried just...

RBHive.tcli_connect('localhost', 9998) do |connection|
  connection.fetch('SHOW TABLES')
end