Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Is there any API for YARN & SPARK History Server in Cloudera Manager

avatar
Explorer

Hi Team,

 

I want the list of all running yarn/spark applications along with the actual user name for the queries running with user as hive. 

1) I was aware that we can use yarn application -list to get the list of running applications and 

2) hive.access.subject.name in the configuration page of yarn history server/resource manager.

 

But for point#2, I need to manually check it for each application which is not a viable solution.

So, I was trying to check if there is any API available for YARN & SPARK history server to get the actual user of the query/application.

(OR)

It would great if we have any command to get the actual user name for a running application.

 

Kindly let me know if any additional information required.

1 ACCEPTED SOLUTION

avatar
Explorer

Thanks for your response @tjangid 

 

This was something informational but unfortunately this is not what I was looking for.

 

Anyways, since I didn't find any API earlier, I have used urllib2 command and connected to History Server directly and then used some regexp's to extract the required content which is (hive.access.subject.name)

View solution in original post

2 REPLIES 2

avatar
Expert Contributor

Hello @KarthiK439 ,

 

You can get the list of Yarn Applications using the below API

https://archive.cloudera.com/cm7/7.0.3/generic/jar/cm_api/apidocs/resource_YarnApplicationsResource....

 

Let me know if this is what you are looking for.

 

Br,

Tarun

 

Was your question answered? Make sure to mark the answer as the accepted solution.

If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Explorer

Thanks for your response @tjangid 

 

This was something informational but unfortunately this is not what I was looking for.

 

Anyways, since I didn't find any API earlier, I have used urllib2 command and connected to History Server directly and then used some regexp's to extract the required content which is (hive.access.subject.name)