【问题标题】:Bigquery command is failing running from oozie workflowBigquery 命令无法从 oozie 工作流运行
【发布时间】:2014-10-20 20:40:09
【问题描述】:

我是 oozie 的新用户。目前我正在尝试从 oozie 中的 shell 脚本运行示例 bigquery 命令(例如:bq ls -p)。但是每次都失败。下面我提供了工作流程和 shell 脚本。我正在 Hortonworks Sandbox 中试用它,并且 gcloud 在 hortonworks 沙箱中进行了身份验证。
我想知道是否无法从 oozie 运行 bigquery 命令? AFAIK Hortonworks 沙盒使用与其数据节点和作业节点相同的虚拟盒。 如果我可以运行,那么任何人都可以帮助我找到答案 - 如果我要从更大的 hadoop 集群运行,我是否需要在每个节点中对 gcloud 进行身份验证?

提前致谢。 我的工作流 xml 示例:

<workflow..
   <start to="run_shell" />
      <action name="run_shell" retry-max="2" retry-interval="1">
        <shell xmlns="uri:oozie:shell-action:0.2">
           <job-tracker>${jobTracker}</job-tracker>
            <name-node>${nameNode}</name-node>
            <configuration>
                <property>
                  <name>mapred.job.queue.name</name>
                  <value>default</value>
                </property>
            </configuration>
            <exec>pl2.sh</exec>
            <argument>/user/bandyoa/AP/</argument>
            <file>${nameNode}/user/bandyoa/AP/pl2.sh#pl2.sh</file> 
            <capture-output/>
        </shell>
        <ok to="end"/>
      <error to="failure_mail"/>
    </action>
</workflo..>

和shell脚本:

#!/bin/bash
bq ls -p

【问题讨论】:

  • 错误信息是什么?
  • 嗨Felipe..我检查了错误日志..实际上它无法在stderr错误日志下面找到bq命令日志类型:stderr日志长度:133 ./pl2.sh:第2行: bq: command not found Oozie Launcher 失败,主类 [org.apache.oozie.action.hadoop.ShellMain],退出代码 [1]
  • 我没用过oozie...不知道怎么调试它的加载路径。
  • 嗨,我可以运行 bq 命令。 unix $PATH 不是指 bq。但现在我只在 Hortonworks 运行中得到“心跳”:oozie 的 shell 脚本中的“bq ls -p”。是关于身份验证的问题吗?仅供参考,如果我直接从命令行给出'bq ls -p',它会给出正确的结果。现在我正在尝试完成 OAuth 2.0 身份验证。但面临的问题:无法导入名称 SignedJwtAssertionCredentials。 (stackoverflow.com/questions/14063124/…)。

标签: shell hadoop google-bigquery oozie


【解决方案1】:

将所有项目设置和身份验证设置从 /home/hdfs/.config 和 /home/hdfs/.bigqueryrc 复制到 /home/ 并将它们设置为对所有用户可读/可写,这让 Oozie 为我感到高兴。现在bq ls 返回默认数据集中的表列表。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多