Lehel44 commented on code in PR #8497:
URL: https://github.com/apache/nifi/pull/8497#discussion_r1527391674
##########
nifi-nar-bundles/nifi-iceberg-bundle/nifi-iceberg-common/src/main/java/org/apache/nifi/processors/iceberg/AbstractIcebergProcessor.java:
##########
@@ -124,10 +124,16 @@ 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();
+ try {
+ final KerberosUserService kerberosUserService =
context.getProperty(KERBEROS_USER_SERVICE).asControllerService(KerberosUserService.class);
+ if (kerberosUserService != null) {
+ final KerberosUser kerberosUser =
kerberosUserService.createKerberosUser();
+ return kerberosUser.getPrincipal();
+ }
+ } catch (IllegalStateException e) {
+ return null;
Review Comment:
```suggestion
getLogger().error("Failed to determine ClassLoader
Isolation Key for " + this + ". This could result in unexpected behavior by
this processor.", e);
return null;
```
--
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]