ZooKeeper zk = getSession();
byte[] tokenBytes = zk.getData(getTokenPath(tokenIdentifier), false, null);
try {
return HiveDelegationTokenSupport.decodeDelegationTokenInformation(tokenBytes);
} catch (Exception ex) {
throw new TokenStoreError("Failed to decode token", ex);
}
} catch (KeeperException.NoNodeException ex) {
return null;
} catch (KeeperException ex) {
throw new TokenStoreError(ex);
} catch (InterruptedException ex) {
throw new TokenStoreError(ex);
}
}