'Unix script to get the yarn logs

I need a script where I can download the yarn log of failed oozie jobs. Any sample/suggestion would be help full. The script should take oozie job id as input and should download the failed step log in a workflow.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source