[
https://issues.apache.org/jira/browse/NIFI-2471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15407926#comment-15407926
]
ASF GitHub Bot commented on NIFI-2471:
--------------------------------------
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.
> Multiple Hadoop processors cannot point to different Hadoop clusters
> --------------------------------------------------------------------
>
> Key: NIFI-2471
> URL: https://issues.apache.org/jira/browse/NIFI-2471
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 0.7.0
> Reporter: Michael Moser
> Assignee: Michael Moser
> Priority: Minor
> Fix For: 1.0.0, 0.8.0
>
>
> Two GetHDFS processors, each with different Hadoop Configuration Resources,
> will only operate with one Hadoop cluster. In this specific case, both
> Hadoop clusters had the same HDFS system name. The AbstractHadoopProcessor
> disables caching of Configuration and FileSystem objects but it doesn't
> appear to be working.
> Also, if I configure a GetHDFS processor to point to one Hadoop cluster, but
> the processor is invalid because the Directory doesn't exist, the processor
> doesn't start (that's good). But if I change the Hadoop Configuration
> Resources to point to a different Hadoop cluster where the Directory does
> exist, then GetHDFS continues to talk to the first Hadoop cluster. It seems
> like the Configuration and FileSystem objects don't reset when I change the
> Hadoop Configuration Resources property.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)