问题描述
当我的代码遇到未处理的异常时,我想自动杀掉所有的hadoop作业。我想知道最佳做法是什么?
谢谢
取决于版本,请执行:
版本 杀死一个hadoop工作: 您可以获得所有jobId的清单: version> = 2.3.0 杀掉hadoop作业: 您可以获得所有ApplicationId的清单: I want to kill all my hadoop jobs automatically when my code encounters an unhandled exception. I am wondering what is the best practice to do it? Thanks Depending on the version, do: version <2.3.0 Kill a hadoop job: You can get a list of all jobId's doing: version >=2.3.0 Kill a hadoop job: You can get a list of all ApplicationId's doing: 这篇关于如何杀死hadoop的工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
hadoop job -kill $ jobId
hadoop job -list
yarn application -kill $ ApplicationId
yarn application -list
hadoop job -kill $jobId
hadoop job -list
yarn application -kill $ApplicationId
yarn application -list