You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Paul Grey (Jira)" <ji...@apache.org> on 2022/03/22 23:55:00 UTC
[jira] [Created] (NIFI-9824) Address WARN log message in ProcessorAuditor on processor RunOnce
Paul Grey created NIFI-9824:
-------------------------------
Summary: Address WARN log message in ProcessorAuditor on processor RunOnce
Key: NIFI-9824
URL: https://issues.apache.org/jira/browse/NIFI-9824
Project: Apache NiFi
Issue Type: Bug
Reporter: Paul Grey
Noticed a WARN log message while reviewing NiFi logs. Tracked issue down to `if` block in `updateProcessorAdvice()`.
```
// state is now stopped... consider the previous state
if (ScheduledState.RUNNING.equals(scheduledState)) {
processorAction.setOperation(Operation.Stop);
} else if (ScheduledState.DISABLED.equals(scheduledState)) {
processorAction.setOperation(Operation.Enable);
}
```
An additional `else if` is needed to handle the "Run Once" case, where `scheduledState` is "Stopped". Otherwise, the `processorAction.setOperation()` is never called, which results in an NPE in `NifiAuditor.saveActions()`.
`WARN org.apache.nifi.audit.ProcessorAuditor Unable to record actions: Cannot invoke "org.apache.nifi.action.Operation.name()" because the return value of "org.apache.nifi.action.Action.getOperation()" is null`
--
This message was sent by Atlassian Jira
(v8.20.1#820001)