Thanks to all I got it working ☺
From: Vinayakumar B [mailto:vinayakumarb.apa...@gmail.com]
Sent: 02 November 2015 20:12
To: user@hadoop.apache.org
Subject: RE: Authenticating to Kerberos enabled Hadoop cluster using Java
For simplicity You just can copy HADOOP_CONF_DIR from one of the
gt;
>
>
> *From:* Subroto Sanyal [mailto:ssan...@datameer.com]
> *Sent:* 02 November 2015 19:54
> *To:* user@hadoop.apache.org
> *Subject:* Re: Authenticating to Kerberos enabled Hadoop cluster using
> Java
>
>
>
> Hi Chhaya,
>
>
>
> Few configuration you need
vember 2015 19:54
To: user@hadoop.apache.org
Subject: Re: Authenticating to Kerberos enabled Hadoop cluster using Java
Hi Chhaya,
Few configuration you need to set:
hadoop.security.authentication=kerberos
hadoop.security.authorization=true
dfs.namenode.kerberos.principal=hdfs/had...@hado
t the beginning in your application.
>
>
>
> Regards
>
> Andreina J
>
>
>
> *From:* Vishwakarma, Chhaya [mailto:
> chhaya.vishwaka...@thinkbiganalytics.com]
> *Sent:* 02 November 2015 PM 04:20
> *To:* user@hadoop.apache.org
> *Subject:* RE: Authenticating t
na j
To: "user@hadoop.apache.org"
Sent: Mon, 02 Nov 2015 4:57 pm
Subject: RE: Authenticating to Kerberos enabled Hadoop cluster using Java
Hi Chhaya,
Please find below sample code .
System.setProperty("java.security.krb5.conf",
"D:\\data\\Desktop\\cluster-test\\krb5.conf");
/
Hi Chhaya,
Thank you for asking straight away. At my latest project (HDP with Kerberos) we
used authenticated users; as they submitted Java jobs MR or Spark reached
through their user name and looked for a valid Kerberos Principal. Upon file
access, HDFS does so. So your user needs to have a val
15 PM 04:20
To: user@hadoop.apache.org
Subject: RE: Authenticating to Kerberos enabled Hadoop cluster using Java
Thanks Niranjan It would be great if you can share a sample code if any?
From: Niranjan Subramanian [mailto:niran...@webaction.com]
Sent: 02 November 2015 16:18
To: user@hadoop.apache.
Thanks Niranjan It would be great if you can share a sample code if any?
From: Niranjan Subramanian [mailto:niran...@webaction.com]
Sent: 02 November 2015 16:18
To: user@hadoop.apache.org
Subject: Re: Authenticating to Kerberos enabled Hadoop cluster using Java
Hi Chhaya,
You can use the
Hi Chhaya,
You can use the UserGroupInformation class from org.apache.hadoop.security
package.
Specifically following 2 methods of that class
UserGroupInformation.setConfiguration(hdfsConfiguration);
UserGroupInformation.loginUserFromKeytab(principal, keytabPath);
Regards,
Niranjan
On 02-