Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How command line use to have number of yarn job with api ambari

Solved Go to solution

How command line use to have number of yarn job with api ambari

New Contributor

Hello,

I want to use commands lines to know number of yarn jobs in a cluster HDP.

can i do that with ambari api rest?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How command line use to have number of yarn job with api ambari

Super Mentor

@Baruch AMOUSSOU DJANGBAN

Are you looking out for following kind of information's to get via Ambari APIs (Which we see in the Ambari YARN Summary Page) ?

.Submitted Apps:

http://erie1.example.com:8080/api/v1/clusters/ErieCluster/host_components?HostRoles/component_name=R...

. Pending Apps

http://erie1.example.com:8080/api/v1/clusters/ErieCluster/host_components?HostRoles/component_name=R...

.Running Apps

http://erie1.example.com:8080/api/v1/clusters/ErieCluster/host_components?HostRoles/component_name=R...

Here "erie1.example.com" is ambari server hostname.

Similarly you can get the Completed/Killed/Failed application informations.

.

5 REPLIES 5

Re: How command line use to have number of yarn job with api ambari

Super Mentor

@Baruch AMOUSSOU DJANGBAN

Are you looking out for following kind of information's to get via Ambari APIs (Which we see in the Ambari YARN Summary Page) ?

.Submitted Apps:

http://erie1.example.com:8080/api/v1/clusters/ErieCluster/host_components?HostRoles/component_name=R...

. Pending Apps

http://erie1.example.com:8080/api/v1/clusters/ErieCluster/host_components?HostRoles/component_name=R...

.Running Apps

http://erie1.example.com:8080/api/v1/clusters/ErieCluster/host_components?HostRoles/component_name=R...

Here "erie1.example.com" is ambari server hostname.

Similarly you can get the Completed/Killed/Failed application informations.

.

Re: How command line use to have number of yarn job with api ambari

New Contributor

@Jay SenSharma

Thanks for your answer! can you have a link for all documentation where i can find all and more information to use ambari api?

Re: How command line use to have number of yarn job with api ambari

Super Mentor

@Baruch AMOUSSOU DJANGBAN

Following link gives a good idea about various Ambari Rest API uris:

https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/index.md

Re: How command line use to have number of yarn job with api ambari

New Contributor

Re: How command line use to have number of yarn job with api ambari

Super Mentor

@Baruch AMOUSSOU DJANGBAN

Apart from Ambari API, If you are open for other API options then you might want to take a look at the Resource Manager Rest APIs as well:

https://hadoop.apache.org/docs/r2.7.2/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html

Example:

http://erie2.example.com:8088/ws/v1/cluster/metrics

Don't have an account?
Coming from Hortonworks? Activate your account here