Variables in configuration files may be Java system properties or other configuration parameters. The list of pre-defined Java system properties is at:

http://java.sun.com/javase/6/docs/api/java/lang/System.html#getProperties()

Unfortunately the host name is not in that list. You could define it by adding something like the following to conf/hadoop-env.sh:

HADOOP_DATANODE_OPTS="-Dhost.name=`hostname`"

Doug

sejong king wrote:
Hello,

In hadoop-site.xml, hadoop.tmp.dir uses ${user.name} to retrieve the username 
for its directory.  Is there a similar way to retrieve the name of the host 
that this particular datanode is starting up on? (in order to create unique 
directory names for each node.  something along the lines of: user.host, 
user.local.name, machine.name, etc...)

Thanks!
-Sej



Reply via email to