tpalfy commented on a change in pull request #4629:
URL: https://github.com/apache/nifi/pull/4629#discussion_r518690436



##########
File path: 
nifi-nar-bundles/nifi-extension-utils/nifi-hadoop-utils/src/main/java/org/apache/nifi/hadoop/SecurityUtil.java
##########
@@ -141,4 +143,37 @@ public static boolean isSecurityEnabled(final 
Configuration config) {
         Validate.notNull(config);
         return 
KERBEROS.equalsIgnoreCase(config.get(HADOOP_SECURITY_AUTHENTICATION));
     }
+
+    public static <T> T callWithUgi(UserGroupInformation ugi, 
PrivilegedExceptionAction<T> action) throws IOException {
+        try {
+            return ugi.doAs(action);
+        } catch (InterruptedException e) {
+            throw new IOException(e);
+        }
+    }
+
+    public static void checkTGTAndRelogin(ComponentLog log, KerberosUser 
kerberosUser, UserGroupInformation ugi) throws IOException {

Review comment:
       Indeed, removing it.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to