You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by "Joseph Witt (JIRA)" <ji...@apache.org> on 2016/04/13 23:13:25 UTC

[jira] [Commented] (NIFI-1764) NullPointerException in PutKafka for failed segments with no delimiter

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

Joseph Witt commented on NIFI-1764:
-----------------------------------

I believe we simply just need to guard whether we set that attribute at all in failed segments.

However, in doing that I was trying to make a unit test to verify and it isn't very straight forward given what we're trying to replicate.  The other thing I noticed is the handling of the kafkaProducer that is setup during onScheduled doesn't have any error handling after the fact which could require the user to stop/start the processor to get it working again in the event of an error.  This is something we need to put handling in for as well.  So I think we should broaden the scope of this ticket a bit to do that and clean this NPE scenario.

> NullPointerException in PutKafka for failed segments with no delimiter
> ----------------------------------------------------------------------
>
>                 Key: NIFI-1764
>                 URL: https://issues.apache.org/jira/browse/NIFI-1764
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.0.0, 0.7.0
>            Reporter: Christopher McDermott
>              Labels: patch
>             Fix For: 1.0.0, 0.7.0
>
>
> {code}
> java.lang.NullPointerException: null
> at java.lang.String.<init>(String.java:503) ~[na:1.8.0_45]
> at org.apache.nifi.processors.kafka.PutKafka.buildFailedFlowFileAttributes(PutKafka.java:396) ~[na:na]
> at org.apache.nifi.processors.kafka.PutKafka.onTrigger(PutKafka.java:308) ~[na:na]
> at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) ~[nifi-api-0.7.0-SNAPSHOT.jar:0.7.0-SNAPSHOT]
> at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1059) ~[nifi-framework-core-0.7.0-SNAPSHOT.jar:0.7.0-SNAPSHOT]
> at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-0.7.0-SNAPSHOT.jar:0.7.0-SNAPSHOT]
> at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-0.7.0-SNAPSHOT.jar:0.7.0-SNAPSHOT]
> at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:123) [nifi-framework-core-0.7.0-SNAPSHOT.jar:0.7.0-SNAPSHOT]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_45]
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_45]
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_45]
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_45]
> {code}
> it appears we assume in PutKafka that a delimiter is being used and that this can cause an NPE.



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