Support Questions

Find answers, ask questions, and share your expertise

ambari + vlaue from ambari GUI is diff from the configs.sh script

avatar

Hi all

I am using the script - /var/lib/ambari-server/resources/scripts/configs.sh get localhost cluster_name config_type

** about the script - https://cwiki.apache.org/confluence/display/AMBARI/Modify+configurations

To read parameters and values from the ambari cluster

But we noticed that some parameters that script read the values , are diff from - Values from ambari GUI i

For example let’s take the parameter - templeton.hive.properties (hive service )

From ambari GUI we get the value:

hive.metastore.local=false,hive.metastore.uris=thrift://master98.tube13.com:9083\,thrift://%HOSTGROUP::host_group_4%:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true

but when we run the script we get

/var/lib/ambari-server/resources/scripts/configs.sh get localhost HDP01 webhcat-site |grep templeton.hive.properties

"templeton.hive.properties" : "hive.metastore.local=false,hive.metastore.uris=thrift://%HOSTGROUP::host_group_1%:9083\\,thrift://%HOSTGROUP::host_group_4%:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true",

Why from ambari GUI value is different ??

** as we can see the diff is about server name defined in the value ( from ambari GUI )

Second if we want to update the value of templeton.hive.properties parameter , from the script , so what is the real value ?

Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Master Mentor

@uri ben-ari

You are seeing the values containing the "%HOSTGROUP::host_group_4" instead of actual hostname, This is because you might have created the cluster using blueprint. Inside the blueprint these placeholders are usually used.

.

- Please check which tag version config are you checking? Is it INITIAL , TOPOLOGY_RESOLVED or any specific version like "version1503221811491297915" ?


http://localhost:8080/api/v1/clusters/Sandbox/configurations?type=webhcat-site&tag=INITIAL

http://localhost:8080/api/v1/clusters/Sandbox/configurations?type=webhcat-site&tag=TOPOLOGY_RESOLVED

http://localhost:8080/api/v1/clusters/Sandbox/configurations?type=webhcat-site&tag=version1503221811...


- We can set any specific property value of any config type using "config.sh set" command.
Syntax:

/var/lib/ambari-server/resources/scripts/configs.sh set $AMBARI_HOST  $CLUSTER_NAME webhcat-site  $KEY  $VALUE


Example: If we want to change the "templeton.exec.timeout" property value then we can use "set" command as following:

/var/lib/ambari-server/resources/scripts/configs.sh set localhost Sandbox webhcat-site  "templeton.exec.timeout" "60001"

.

Reference: https://cwiki.apache.org/confluence/display/AMBARI/Modify+configurations

View solution in original post

6 REPLIES 6

avatar
Master Mentor

@uri ben-ari

You are seeing the values containing the "%HOSTGROUP::host_group_4" instead of actual hostname, This is because you might have created the cluster using blueprint. Inside the blueprint these placeholders are usually used.

.

- Please check which tag version config are you checking? Is it INITIAL , TOPOLOGY_RESOLVED or any specific version like "version1503221811491297915" ?


http://localhost:8080/api/v1/clusters/Sandbox/configurations?type=webhcat-site&tag=INITIAL

http://localhost:8080/api/v1/clusters/Sandbox/configurations?type=webhcat-site&tag=TOPOLOGY_RESOLVED

http://localhost:8080/api/v1/clusters/Sandbox/configurations?type=webhcat-site&tag=version1503221811...


- We can set any specific property value of any config type using "config.sh set" command.
Syntax:

/var/lib/ambari-server/resources/scripts/configs.sh set $AMBARI_HOST  $CLUSTER_NAME webhcat-site  $KEY  $VALUE


Example: If we want to change the "templeton.exec.timeout" property value then we can use "set" command as following:

/var/lib/ambari-server/resources/scripts/configs.sh set localhost Sandbox webhcat-site  "templeton.exec.timeout" "60001"

.

Reference: https://cwiki.apache.org/confluence/display/AMBARI/Modify+configurations

avatar

so it will be ok if I will return the value as the first version ? (V1) - "hive.metastore.local=false,hive.metastore.uris=thrift://%HOSTGROUP::host_group_1%:9083\\,thrift://%HOSTGROUP::host_group_4%:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true"

Michael-Bronson

avatar
Master Mentor

@uri ben-ari

No, When you plan to update the values, then you should replace the "%HOSTGROUP::host_group_1%" and "

%HOSTGROUP::host_group_4%" placeholders with the actual Hostnames.

.


Example: (using Sandbox Values here for example)

# /var/lib/ambari-server/resources/scripts/configs.sh set localhost Sandbox webhcat-site  "templeton.hive.properties" "hive.metastore.local=false,hive.metastore.uris=thrift://sandbox.hortonworks.com:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true,hive.metastore.warehouse.dir=/apps/hive/warehouse"

.

avatar

ok , I will tell you why I ask these questions , our target is to alignment old blueprint values ( usually they are ambari that installed last year or more ) with our current ambari blueprint values , so we make diff between the old amanari system to the new ambari system , and if values are diff then we replaced the old with the current value , so do you have suggestion regarding that some value in our current cluster are diff between the script output to the ambari cluster ?

second - dose the - %HOSTGROUP::host_group , is only the one value that is diff between the script to the ambari GUI ? ( if not do we can identify all parameters that values from config.sh script will be diff from ambari GUI ? )

remark - we intend to set all amabri parameters ( old Amabri systems ) with the config.sh script

Michael-Bronson

avatar

Jay - regarding my last question , is it possible to find out what are the parameters that we cant set from the config.sh script ? ( for example all params with % ? )

Michael-Bronson

avatar

Jay - some of our ambari clusters are old ( they installed before 6-8 month ) , so what is the best approach to alignments the old ambari system ( I mean the parameters with the values ) so they will have the full parameters as our current ambari clusters ?

Michael-Bronson