turcsanyip commented on code in PR #7449:
URL: https://github.com/apache/nifi/pull/7449#discussion_r1246952906
##########
nifi-nar-bundles/nifi-iceberg-bundle/nifi-iceberg-processors/src/main/java/org/apache/nifi/processors/iceberg/AbstractIcebergProcessor.java:
##########
@@ -117,6 +122,15 @@ public void onTrigger(ProcessContext context,
ProcessSession session) throws Pro
}
}
+ @Override
+ public String getClassloaderIsolationKey(PropertyContext context) {
+ final KerberosUserService kerberosUserService =
context.getProperty(KERBEROS_USER_SERVICE).asControllerService(KerberosUserService.class);
+ if (kerberosUserService != null) {
+ return kerberosUserService.getIdentifier();
Review Comment:
I would suggest using the same classloader isolation key as the one in the
other hadoop related components: kerberos principal.
```
final KerberosUser kerberosUser =
kerberosUserService.createKerberosUser();
return kerberosUser.getPrincipal();
```
The controller service identifier also works but it may be too restrictive.
It creates separate classloaders for controller services having the same
principal but they could share the classloader.
E.g. the user can create a process group with the kerberos service and the
iceberg processor in it and then copy it multiple times. Not the best design
because the kerberos service should be extracted in the parent process group in
this case but I can imagine it happening.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]