By the way, regarding the _HOST convention: I indeed saw hat in the HBase package, and it works perfectly.
What I meant was, I'm probably not the only one to need this. It would maybe be good to provide an "official" way of accomplishing it :) Thanks ________________________________________ From: Nathaniel Braun <[email protected]> Sent: Monday, June 1, 2015 7:20 PM To: [email protected] Subject: Re: Need hostname for use in appConfig.json Thanks for your answer, I did try using {THIS_HOST}, it didn't work Regards, Nathaniel ________________________________________ From: Jon Maron <[email protected]> Sent: Monday, June 1, 2015 6:39:41 PM To: [email protected] Subject: Re: Need hostname for use in appConfig.json 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 <[email protected]> wrote: > > Have you tried using ${THIS_HOST} in appConfig? Did it not work? > > -Gour > > On 6/1/15, 9:14 AM, "Nathaniel Braun" <[email protected]> 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 >> >
