def kill(self, app_id):
"""
Method to kill a yarn application
Parameters
----------
app_id: str
YARN application id
Returns
-------
bool:
True if successful, False otherwise.
"""
cmd = ["yarn", "application", "-kill", app_id]
try:
out = shell_out(cmd, stderr=STDOUT)
return "Killed application" in out
except SubprocessError:
return False
评论列表
文章目录