1

I'm using spark with yarn in cluster mode and I wouldlike to retrieve only the logs concerning spark in order to use the history server. Is there a way to do that instead of copy pasting it from the big log files ?

Tiffany
  • 263
  • 1
  • 13
  • 1
    `yarn application -list | grep "SPARK" | awk '{print $1}'` to get the applicationId of all spark applications – philantrovert Sep 07 '17 at 08:45
  • @Tiffany Hatsune Hi, can you please help me setting zeppelin on spark cluster mode using docker. I am stuck with this for a while. Followed few tutorial on internet but still unsuccessful. – Rohit Barnwal Sep 11 '17 at 07:18
  • Already asked a question here, https://stackoverflow.com/questions/46149472/running-zeppelin-on-spark-cluster-mode – Rohit Barnwal Sep 11 '17 at 07:18
  • Sorry I don't have any experience with Zeppelin :( – Tiffany Sep 11 '17 at 08:56

1 Answers1

3

Yes, you can take logs of each task. You need to go to the yarn UI (8088 port) and copy id of the task. Then use command:

yarn logs --applicationId <TASK_ID> 

For example:

yarn logs --applicationId application_1504771895665_0001    

By this command you can see logs of each container that task used.

Andrew Tobilko
  • 48,120
  • 14
  • 91
  • 142
Yehor Krivokon
  • 837
  • 5
  • 17