hadoop - 在后续 Action 中获取 YARN Action 应用 ID

标签 hadoop hadoop-yarn oozie

我正在运行 OOZIE 工作流,并在 map-reduce 操作中进行仅限 map 的分布式模型拟合。由于有很多映射器,我编写了一个代码,使用 yarn logs -applicationId application_x 编译所有映射器任务的 YARN 日志,其中 application_x 是所有映射任务的父应用程序 ID。现在我想将此摘要作为工作流的一部分,因此我需要动态获取 application_x,这是上一个操作的应用程序 ID。有什么办法可以得到这个吗?

最佳答案

我没有对此进行测试,但我认为您可以通过工作流 EL 函数获得此信息:

wf:actionExternalId(String node)

It returns the external Id for an action node, or an empty string if
the action has not being executed or it has not completed yet.

因此在 map reduce 作业完成后的节点中,您应该能够使用类似 L 的东西

wf:actionExternalId('mapred-node-name')

我怀疑它会返回 job_xxx 而不是 application_xxx,但你可能可以处理它。

关于hadoop - 在后续 Action 中获取 YARN Action 应用 ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39372293/

相关文章:

hadoop-yarn - 当 flink 作业失败时,Yarn 报告 flink 作业为 FINISHED 和 SUCCEED

hadoop - FNF:无法执行ssh-base.sh

file - Hadoop 定期生成的文件

linux - 满足条件时执行管道命令

hadoop - 使用日志文件和HUE在Hive中创建表

hadoop - 在 EMR MapReduce2 YARN 中分配资源(映射器数量)问题

docker - Apache Hadoop Yarn 与 Kubernetes

java - 通过Java API调用从Oozie获得的工作流信息

shell - 在oozie中计划/运行mahout命令

java - 将 Hadoop 输出存储到本地 mongodb