Python program to check for processes running by hadoop user and which is running for more than 3 hours.

I am looking to find a python method which checks for the process that are running in the background for more than 3 hours and the user is hadoop.

I have jobs running on the emr through out the day the expected time for a job is less than 2 hours but my requirement is to find if any job is running for more than 3 hours which is running on the hadoop user.

I tried yarn application -list but no luck any help is greatly appreciated.

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.