【问题标题】:Hive CLI: what are the possible exit codes and their meanings?Hive CLI:可能的退出代码及其含义是什么?
【发布时间】:2011-10-27 18:43:09
【问题描述】:

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

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

谁能向我提供 Hive CLI 的可能退出代码及其含义的列表?

【问题讨论】:

    标签: shell command-line-interface hive


    【解决方案1】:

    为什么不改用 hive thrift api?然后您会收到带有正确消息的异常返回。

    在 ruby​​ 中很简单:

    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
    

    【讨论】:

      猜你喜欢
      • 2015-02-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-24
      • 1970-01-01
      • 2017-07-26
      • 2013-04-17
      • 1970-01-01
      相关资源
      最近更新 更多