You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hadoop.apache.org by Andrew McDermott <an...@linaro.org> on 2013/10/09 18:19:18 UTC

using environment variables in XML conf files

I have the following path hard-coded for hadoop.tmp.dir in
conf/core-site.xml:

    <configuration>
      <property>
        <name>hadoop.tmp.dir</name>
        <value>/home/aim/tmp/hadoop-${user.name}</value>
      </property>
    </configuration>

Is it possible to replace the "/home/aim" with a substitutable version
$HOME?  On a whim I tried ${env.home} but that didn't work...

-- 
andy



Re: using environment variables in XML conf files

Posted by Harsh J <ha...@cloudera.com>.
Java provides a system property for ${user.home} that is usually set
to the same as $HOME of the session on Linux. You can therefore use
"${user.home}/tmp/hadoop-${user.name}".

On Wed, Oct 9, 2013 at 9:49 PM, Andrew McDermott
<an...@linaro.org> wrote:
>
> I have the following path hard-coded for hadoop.tmp.dir in
> conf/core-site.xml:
>
>     <configuration>
>       <property>
>         <name>hadoop.tmp.dir</name>
>         <value>/home/aim/tmp/hadoop-${user.name}</value>
>       </property>
>     </configuration>
>
> Is it possible to replace the "/home/aim" with a substitutable version
> $HOME?  On a whim I tried ${env.home} but that didn't work...
>
> --
> andy
>
>



-- 
Harsh J

Re: using environment variables in XML conf files

Posted by Harsh J <ha...@cloudera.com>.
Java provides a system property for ${user.home} that is usually set
to the same as $HOME of the session on Linux. You can therefore use
"${user.home}/tmp/hadoop-${user.name}".

On Wed, Oct 9, 2013 at 9:49 PM, Andrew McDermott
<an...@linaro.org> wrote:
>
> I have the following path hard-coded for hadoop.tmp.dir in
> conf/core-site.xml:
>
>     <configuration>
>       <property>
>         <name>hadoop.tmp.dir</name>
>         <value>/home/aim/tmp/hadoop-${user.name}</value>
>       </property>
>     </configuration>
>
> Is it possible to replace the "/home/aim" with a substitutable version
> $HOME?  On a whim I tried ${env.home} but that didn't work...
>
> --
> andy
>
>



-- 
Harsh J

Re: using environment variables in XML conf files

Posted by Harsh J <ha...@cloudera.com>.
Java provides a system property for ${user.home} that is usually set
to the same as $HOME of the session on Linux. You can therefore use
"${user.home}/tmp/hadoop-${user.name}".

On Wed, Oct 9, 2013 at 9:49 PM, Andrew McDermott
<an...@linaro.org> wrote:
>
> I have the following path hard-coded for hadoop.tmp.dir in
> conf/core-site.xml:
>
>     <configuration>
>       <property>
>         <name>hadoop.tmp.dir</name>
>         <value>/home/aim/tmp/hadoop-${user.name}</value>
>       </property>
>     </configuration>
>
> Is it possible to replace the "/home/aim" with a substitutable version
> $HOME?  On a whim I tried ${env.home} but that didn't work...
>
> --
> andy
>
>



-- 
Harsh J

Re: using environment variables in XML conf files

Posted by Harsh J <ha...@cloudera.com>.
Java provides a system property for ${user.home} that is usually set
to the same as $HOME of the session on Linux. You can therefore use
"${user.home}/tmp/hadoop-${user.name}".

On Wed, Oct 9, 2013 at 9:49 PM, Andrew McDermott
<an...@linaro.org> wrote:
>
> I have the following path hard-coded for hadoop.tmp.dir in
> conf/core-site.xml:
>
>     <configuration>
>       <property>
>         <name>hadoop.tmp.dir</name>
>         <value>/home/aim/tmp/hadoop-${user.name}</value>
>       </property>
>     </configuration>
>
> Is it possible to replace the "/home/aim" with a substitutable version
> $HOME?  On a whim I tried ${env.home} but that didn't work...
>
> --
> andy
>
>



-- 
Harsh J