Thanks Niranjan It would be great if you can share a sample code if any?

From: Niranjan Subramanian [mailto:[email protected]]
Sent: 02 November 2015 16:18
To: [email protected]
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 
<[email protected]<mailto:[email protected]>>
 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

Reply via email to