Hive CLI:可能的退出代码及其含义是什么?

时间:2011-10-27 18:43:10

标签: shell command-line-interface hive

我正在使用一个使用Hive CLI客户端执行一些HQL脚本的shell脚本。有时这些调用可以生成异常,在我的脚本中,我必须检查何时发生。

我很难在CLI客户端上找到任何文档。我在hive.apache.orgWiki上找不到任何内容,相关的Google搜索也没有返回任何有用的内容。

任何人都可以向我提供Hive CLI的可能退出代码列表及其含义吗?

1 个答案:

答案 0 :(得分:-1)

为什么不使用hive thrift api呢?然后通过正确的消息返回异常。

在红宝石中,它很简单:

require 'rubygems'
require 'rbhive'


RBHive.connect(host, port) do |connection|
    begin
        connection.fetch("select * from table1") #this throws various exceptions
    rescue Exception => ex
        puts "oh no! An error: #{ex.message}"
    end
end
相关问题