hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niranjan Subramanian <niran...@webaction.com>
Subject Re: Authenticating to Kerberos enabled Hadoop cluster using Java
Date Mon, 02 Nov 2015 10:48:19 GMT
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>
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