【问题标题】:how to execute oozie shell action with script having curl command如何使用具有 curl 命令的脚本执行 oozie shell 操作
【发布时间】:2015-12-17 10:51:55
【问题描述】:

抱歉,因为我之前没有尝试过。

嗨,

我需要创建执行 shell 脚本的 oozie 工作流。 shell 脚本有 curl 命令,可以从客户端的 repo 下载一个特定的文件。

由于shell脚本中的命令只能识别hdfs目录,我该如何执行脚本呢?

下面是示例代码:

curl -o ~/test.jar http://central.maven.org/maven2/commons-lang/commons-lang/2.6/commons-lang-2.6.jar

hdfs dfs -copyFromLocal ~/test.jar /user/sr/test2

如何使用 oozie 执行上述两个命令的脚本?

【问题讨论】:

  • 你有没有配置过Oozie Workflow.xml,如果有的话也共享一下……你可以参考Linklink。您还必须在 DFS 位置上传脚本。

标签: oozie


【解决方案1】:

我找到了答案……

数据=curl http://central.maven.org/maven2/commons-lang/commons-lang/2.6/commons-lang-2.6.csv 回声“$数据”| hdfs dfs -appendToFile - /path/to/hdfs/directory/PPP.csv

【讨论】:

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