2016-07-22 68 views

回答

0

对于AWS EMR Hive,这是您连接到默认版本的方式。

RBHive.tcli_connect('<AWS-EMR-IP>', 10_000) do |connection| 
    connection.fetch('SHOW TABLES') 
end 

而Hive监听端口10000为Hive 0.13.1版本。如果您想连接到不同的版本,请检查此链接。

http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-hive-differences.html

+0

感谢 - 但会带来一些其他问题: 1)当我运行的代码,我得到: ''tcli_connect':未定义的方法'键?对于10000:Fixnum(NoMethodError) \t from hivetest.rb:3:in'

' 2)我的Hive版本在AWS控制台中列为1.0.0,并且没有相应的条目。我错过了什么吗? 谢谢! –

+0

你的问题是一个安静的回答:) – error2007s

+0

这是在AWS的更新版本的Hive的新指南http://docs.aws.amazon.com///ElasticMapReduce/latest/ReleaseGuide/emr-release-components html的 – error2007s