I would like to make a webhdfs call to retrive a file from secure node using Java.
Here is what I am doing 1. login using keytab (works fine). I am getting a kerberos ticket 2. Now when I try to invoke the below code, what it does is, it tries to get the delegationtoken by making a https call and it fails with 401 https://mynode:50070/webhdfs/v1/?op=GETDELEGATIONTOKEN&user.name=myuser
Here is the code to open the hdfs file
FileSystem webFS = FileSystem.get(new URI("swebhdfs://" + domain + "myfile"), conf);
BufferedReader br=new BufferedReader(new InputStreamReader(webFS.open(new Path("swebhdfs://" + domain + "myfile"))));
My question is since I have the kerberos ticket, how can I pass that one to UserGropupInformation object?
Thanks,