I have a use case where I have some long-running client code that accesses HDFS using UserGroupInformation.loginUserFromKeytab and that attempts to keep the session alive using UserGroupInformation.getCurrentUser.checkTGTAndReloginFromKeytab(). This appears to work well normally but when the HDFS name nodes are restarted, the delegations tokens that are cached on the Name Nodes are lost and the client fails to recover. I have also tried calling again UserGroupInformation.loginUserFromKeytab. The core functionality of the client is to interact with org.apache.hadoop.fs.FileSystem to create files and write data. Would anyone have any advice on how to get the client to relogin and have a new delegation token issued?
Asked
Active
Viewed 828 times
0
-
http://stackoverflow.com/questions/33211134/hbase-kerberos-connection-renewal-strategy/33243360#33243360 – Samson Scharfrichter Jun 14 '16 at 08:56
-
Thanks @SamsonScharfrichter for the link but I think my issue is a little different. In my case, the Name Nodes no longer accept my delegation token (eg the name nodes were restarted or the token lifetime has elapsed) - so what I am asking is how do I get a new delegation token without restarting my JVM. – PJ Fanning Jun 15 '16 at 17:05
-
IMHO that should be the job of the client Java API, under the covers... – Samson Scharfrichter Jun 20 '16 at 11:52