You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by rkarthik29 <gi...@git.apache.org> on 2017/03/08 17:54:11 UTC

[GitHub] nifi pull request #1364: NIFI-1856 ExecuteStreamCommand Needs to Consume Sta...

Github user rkarthik29 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1364#discussion_r104979167
  
    --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteStreamCommand.java ---
    @@ -287,6 +311,32 @@ protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String
             .build();
         }
     
    +    @OnScheduled
    +    public void setupExecutor(final ProcessContext context) {
    +        executor = Executors.newFixedThreadPool(context.getMaxConcurrentTasks() * 2, new ThreadFactory() {
    +            private final ThreadFactory defaultFactory = Executors.defaultThreadFactory();
    +
    +            @Override
    +            public Thread newThread(final Runnable r) {
    +                final Thread t = defaultFactory.newThread(r);
    +                t.setName("ExecuteStreamCommand " + getIdentifier() + " Task");
    +                return t;
    +            }
    +        });
    +    }
    +
    +    @OnUnscheduled
    --- End diff --
    
    change has been done and submitted to git.


---
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.
---