I have enabled logs using yarn-site.xml. After this I restarted yarn as well.
After running a sample MR application, I was able to see the applicationID using command:
yarn application -list.
Now, for checking logs when I issue the command - yarn logs -applicationId <application ID>, and I am get the following prompt instead of logs:
hdfs://<ip address>/var/log/hadoop-yarn/path/to/application/ does not have any log files
Please help me to figure out what went wrong and what is the correct way to check logs.