You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by bbende <gi...@git.apache.org> on 2016/03/30 17:58:59 UTC

[GitHub] nifi pull request: NIFI-1697 Ensuring FlowController appropriately...

GitHub user bbende opened a pull request:

    https://github.com/apache/nifi/pull/312

    NIFI-1697 Ensuring FlowController appropriately wraps code with NarClosable

    From debugging this issue it was noticed that the problem only occurred while a PutHDFS processor was enabled (running/stopepd), but if it was disabled the problem went away. This led to realizing that when the processor is running or stopped, validation is being called and was not being wrapped with NarCloseable to ensure the validation uses the same classpath as the component uses when executing.
    
    This PR ensures that the FlowController wraps validation with NarCloseable, and also when calling OnPrimaryNodeStateChanged which needed to be wrapped as well.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bbende/nifi NIFI-1697

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/312.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #312
    
----
commit 605c6c88b53076034560d5faf3399c7e2b3e98fd
Author: Bryan Bende <bb...@apache.org>
Date:   2016-03-30T15:46:52Z

    NIFI-1697 Ensuring FlowController appropriately wraps code with NarCloseable

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request: NIFI-1697 Ensuring FlowController appropriately...

Posted by mcgilman <gi...@git.apache.org>.
Github user mcgilman commented on the pull request:

    https://github.com/apache/nifi/pull/312#issuecomment-205303764
  
    +1 Looks good. Merged to master and the support/0.6.x branch. Thanks!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request: NIFI-1697 Ensuring FlowController appropriately...

Posted by mcgilman <gi...@git.apache.org>.
Github user mcgilman commented on the pull request:

    https://github.com/apache/nifi/pull/312#issuecomment-205294713
  
    Revieiwng....


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request: NIFI-1697 Ensuring FlowController appropriately...

Posted by mcgilman <gi...@git.apache.org>.
Github user mcgilman commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/312#discussion_r57917391
  
    --- Diff: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java ---
    @@ -2539,6 +2539,12 @@ private ProcessorStatus getProcessorStatus(final RepositoryStatusReport report,
             return status;
         }
     
    +    private boolean isValid(ProcessorNode procNode) {
    +        try (final NarCloseable narCloseable = NarCloseable.withNarLoader()) {
    +            return procNode.isValid();
    --- End diff --
    
    Like we do here [1].
    
    [1] https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java#L956


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request: NIFI-1697 Ensuring FlowController appropriately...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi/pull/312


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request: NIFI-1697 Ensuring FlowController appropriately...

Posted by mcgilman <gi...@git.apache.org>.
Github user mcgilman commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/312#discussion_r57917189
  
    --- Diff: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java ---
    @@ -2539,6 +2539,12 @@ private ProcessorStatus getProcessorStatus(final RepositoryStatusReport report,
             return status;
         }
     
    +    private boolean isValid(ProcessorNode procNode) {
    +        try (final NarCloseable narCloseable = NarCloseable.withNarLoader()) {
    +            return procNode.isValid();
    --- End diff --
    
    I believe we want to wrap the call into validate() on the Processor in procNode.isValid() rather than the entire isValid() method [1].
    
    [1] https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java#L911


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---