Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce >> mail # user >> Getting hostname (or any environment variable) into *-site.xml files


Copy link to this message
-
Getting hostname (or any environment variable) into *-site.xml files
Hi,
   We are using a library with hdfs that uses custom properties inside the
*-site.xml files.  Instead of (a) hard-coding or (b) writing a "sed" script
to update to the local hostnames on each deployed node, is there a
mechanism to use environment variables?

<property>
<name>custom.property</name>
<value>${HOSTNAME}</value>
</property>
I have tried this and out of the box the string ${HOSTNAME} is used.
 Anyone have recommendation/solution on this?

thanks,

stephen b
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB