Alternatively, you could also try using the convention used elsewhere in 
hadoop:  username/_HOST@domain.  _HOST is generally replaced at runtime with 
the host name.  Most applications currently honor that convention (Internally 
calling SecurityUtil.getServerPrincipal(String principalConfig,String hostname))


> On Jun 1, 2015, at 12:36 PM, Gour Saha <gs...@hortonworks.com> wrote:
> 
> Have you tried using ${THIS_HOST} in appConfig? Did it not work?
> 
> -Gour
> 
> On 6/1/15, 9:14 AM, "Nathaniel Braun" <n.br...@criteo.com> wrote:
> 
>> Hi everyone,
>> 
>> We are currently working on the configuration files with Kerberos
>> principals in them, and it turns out that the Kerberos principal is
>> linked to the hostname, so we need it.
>> 
>> What we would like to do is something like that:
>> 
>> 
>> 1.       In appConfig.json
>> 
>> Set the global hostname: "site.global.hostname": "${THIS_HOST}"
>> 
>> 
>> 2.       In our default httpfs-site configuration file:
>> 
>> Read that value using the following piece of code:
>> 
>> <name>httpfs.authentication.kerberos.principal</name><value>HTTP/${@//site
>> /global/hostname}</value>
>> <name>httpfs.hadoop.authentication.kerberos.principal</name><value>HTTP/${
>> @//site/global/hostname}</value>
>> 
>> For this to work, we need the THIS_HOST variable to work in the
>> appConfig.json file.
>> 
>> How can we achieve such a feature?
>> 
>> Thanks & regards,
>> Nathaniel
>> 
> 

Reply via email to