hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vishwakarma, Chhaya" <Chhaya.Vishwaka...@Thinkbiganalytics.com>
Subject RE: Authenticating to Kerberos enabled Hadoop cluster using Java
Date Mon, 02 Nov 2015 10:50:21 GMT
Thanks Niranjan It would be great if you can share a sample code if any?

From: Niranjan Subramanian [mailto:niranjan@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 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-Nov-2015, at 4:15 pm, Vishwakarma, Chhaya <Chhaya.Vishwakarma@Thinkbiganalytics.com<mailto:Chhaya.Vishwakarma@Thinkbiganalytics.com>>
wrote:



I have Kerberos enabled Hadoop cluster, I need to perform HDFS operations using JAVA code.

I have keytab file and username can someone please suggest how can I autheticate to Kerberos
using JAVA code?
Regards,
Chhaya


Mime
View raw message