Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIFI-2471 fix Hadoop configuration resources when talking to ... #779

Closed
wants to merge 2 commits into from

Conversation

mosermw
Copy link
Member

@mosermw mosermw commented Aug 3, 2016

…multiple Hadoop clusters

@@ -177,9 +178,17 @@ protected KerberosProperties getKerberosProperties() {
return results;
}

@Override
public void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mosermw I'm not sure that this is really necessary. The abstractOnStopped() method resets hdfsResources to new HdfsResources(null, null, null) - so every time that it's stopped, it gets reset. I think maybe the only change needed is the change below to config.set(disableCacheName, "true") ??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you're right - it is not calling @OnStopped methods when @OnScheduled throws an Exception. I created a ticket for that - https://issues.apache.org/jira/browse/NIFI-2484. I think we should avoid working around the bug in this PR though and just address it in the framework.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alrighty, no problem. I've added a commit to this PR to remove this onPropertyModified method. Hopefully the two commits can be squashed to one. Thanks!

@asfgit asfgit closed this in b7b1dc2 Aug 4, 2016
asfgit pushed a commit that referenced this pull request Aug 4, 2016
@markap14
Copy link
Contributor

markap14 commented Aug 4, 2016

OK thanks @mosermw. Looks good. Merged to master & 0.x branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants