Support Questions

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

REST API + how to verify the max value for each parameter in ambari

avatar

hi all

as all know each value in ambari have MAX value

example

lets take for example the - NameNode Java heap size

in ambari we can see that max value is 15.5G

while the current value is 9.75

we want to create REST API that will set the value to the max - 15.5G

is it possible ? by API ?

or other solution ?

note - the value - 15.5G is unknown value , the target of the quastion is to set the MAX value , without to know the value

93648-capture.png

Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Master Mentor

@Michael Bronson

The Max limit should be (RAM on NameNode - 500MB) i guess because Operating System processes also need some amount of RAM memory.

Do you have 16 GB RAM on your NameNode host?

Please check the NameNode "Hosts/total_mem" (Total Memory). You can assign NameNode heap not maore than that ideally even if the configuration file can have higher value.

# curl -H "X-Requested-By: ambari" -u admin:admin -X GET "http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts?fields=Hosts/rack_info,Hosts/host_name,Hosts/maintenance_state,Hosts/public_host_name,Hosts/total_mem"

.

View solution in original post

5 REPLIES 5

avatar
Master Mentor

@Michael Bronson

The Max limit should be (RAM on NameNode - 500MB) i guess because Operating System processes also need some amount of RAM memory.

Do you have 16 GB RAM on your NameNode host?

Please check the NameNode "Hosts/total_mem" (Total Memory). You can assign NameNode heap not maore than that ideally even if the configuration file can have higher value.

# curl -H "X-Requested-By: ambari" -u admin:admin -X GET "http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts?fields=Hosts/rack_info,Hosts/host_name,Hosts/maintenance_state,Hosts/public_host_name,Hosts/total_mem"

.

avatar

@Jay , first thank you , actually what we want is the value of the MAX BAR ( as displayed 15.508 ) , is it posible to get this value by REST API , ?

Michael-Bronson

avatar
Master Mentor

UI uses Java Script to parse and process the bar values. I am afraid that using API call we can not get those values calculations.

Mostly the recommendations comes from the "stack_advisor.py" script as following:

https://github.com/apache/ambari/blob/release-2.6.2/ambari-server/src/main/resources/stacks/stack_ad...

.

avatar

@Jay as you know some parameters in ambari have scroll bar ( with max bar value ) , what we want is to know the MAX of the BAR by REST API

Michael-Bronson

avatar

Jay another example . you can see that BAR ended on - 32

so can we create some API that will give this value ( 32 ) ?

93649-capture.png

Michael-Bronson