Github user mosermw commented on a diff in the pull request:
https://github.com/apache/nifi/pull/779#discussion_r73542639
--- Diff:
nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java
---
@@ -177,9 +178,17 @@ protected KerberosProperties getKerberosProperties() {
return results;
}
+ @Override
+ public void onPropertyModified(PropertyDescriptor descriptor, String
oldValue, String newValue) {
--- End diff --
Thanks for looking at this @markap14. I originally thought the same way
you describe. During testing, though, the AbstractHadoopProcessor's
OnScheduled method works but the GetHDFS OnScheduled method throws a "Failed to
invoke OnScheduled method due to java.lang.RuntimeException: Caused by
java.io.IOException: PropertyDescriptor[Directory] has invalid value
/some/directory. The directory does not exist." When stopping the invalid
processor, the abstractOnStopped() method is not called. Perhaps that's an
issue unto itself, but adding an onPropertyModified method here fixed the
problem that HdfsResources was not null the next time the processor was started.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---