Support Questions

Find answers, ask questions, and share your expertise
Announcements
Now Live: Explore expert insights and technical deep dives on the new Cloudera Community BlogsRead the Announcement

how to define global variable in ambari

avatar
New Member

I'm want define global variable in ambari and faile in cluster-env.xml. how to do?

1 ACCEPTED SOLUTION

avatar
Rising Star

You can use configs.sh for this

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

/var/lib/ambari-server/resources/scripts/configs.sh set localhost cl1 cluster-env "myproperty" "myvalue" ########## Performing 'set' myproperty:myvalue on (Site:cluster-env, Tag:version1) ########## PUTting json into: doSet_version1459927360931285086.json ########## NEW Site:cluster-env, Tag:version1459927360931285086

View solution in original post

1 REPLY 1

avatar
Rising Star

You can use configs.sh for this

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

/var/lib/ambari-server/resources/scripts/configs.sh set localhost cl1 cluster-env "myproperty" "myvalue" ########## Performing 'set' myproperty:myvalue on (Site:cluster-env, Tag:version1) ########## PUTting json into: doSet_version1459927360931285086.json ########## NEW Site:cluster-env, Tag:version1459927360931285086