[ 
https://issues.apache.org/jira/browse/NIFI-2608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15436886#comment-15436886
 ] 

ASF GitHub Bot commented on NIFI-2608:
--------------------------------------

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

    https://github.com/apache/nifi/pull/930#discussion_r76246007
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-nar-utils/src/main/java/org/apache/nifi/nar/NarCloseable.java
 ---
    @@ -34,8 +35,26 @@ public static NarCloseable withNarLoader() {
         }
     
         /**
    -     * Creates a Closeable object that can be used to to switch to current 
class loader to the framework class loader
    -     * and will automatically set the ClassLoader back to the previous 
class loader when closed
    +     * Sets the current thread context class loader to the specific 
appropriate
    +     * Nar class loader for the given configurable component. Restores to 
the
    +     * previous classloader once complete. If the given class is not 
assignable
    +     * from ConfigurableComponent then the NarThreadContextClassLoader is 
used.
    +     *
    +     * @param componentClass componentClass
    +     * @return NarCloseable with current thread context classloader jailed 
to
    +     * the nar of the component
    +     */
    +    public static NarCloseable withComponentNarLoader(final Class 
componentClass) {
    +        final ClassLoader current = 
Thread.currentThread().getContextClassLoader();
    +        
Thread.currentThread().setContextClassLoader(NarThreadContextClassLoader.getInstance());
    --- End diff --
    
    I think this line is superfluous - we are immediately overwriting the 
context class loader in the next line.


> Align Consume Kafka with Kafka 0.9 unified API and support 0.10 clients
> -----------------------------------------------------------------------
>
>                 Key: NIFI-2608
>                 URL: https://issues.apache.org/jira/browse/NIFI-2608
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Oleg Zhurakousky
>            Assignee: Joseph Witt
>            Priority: Critical
>             Fix For: 1.0.0
>
>
> KafkaConsumer went fro thread-safe in 0.8 to not-thread-safe in 0.9 which was 
> overlooked while implementing new ConsumeKafka processor which relied on 0.9 
> Client API.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to