title: How to retrieve yarn's logs programmatically using java
body: <p>I actually retrieve my spark application's logs on a linux shell with :</p>
  
  <p><code>yarn logs -applicationId applicationid</code></p>
  
  <p>Is there any way to retrieve it programmatically using java ?</p>