[
https://issues.apache.org/jira/browse/NIFI-6041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pierre Villard resolved NIFI-6041.
----------------------------------
Resolution: Feedback Received
Apache NiFi 1.x is no longer maintained and no new release is planned on the
1.x release line. Marking as resolved as part of a cleanup operation. Please
open a new one with an updated description if this is still relevant for NiFi
2.x.
> MergeRecord can NPE if all flow files have 0 records
> ----------------------------------------------------
>
> Key: NIFI-6041
> URL: https://issues.apache.org/jira/browse/NIFI-6041
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 1.9.0
> Reporter: Bryan Bende
> Priority: Minor
>
> If you create a MergeRecord processor with a Max Bin Age set, and then send
> in a bunch of flow files that all have no records, then eventually it will
> attempt to complete a bin based on the bin age, but will NPE because the
> record writer was never initialized...
> {code:java}
> 2019-02-15 10:25:51,939 ERROR [Timer-Driven Process Thread-4]
> o.a.nifi.processors.standard.MergeRecord
> MergeRecord[id=f1ae2102-0168-1000-fdf0-55ae047ea383] Failed to merge
> FlowFiles to create new bin due to java.lang.NullPointerException:
> java.lang.NullPointerException
> java.lang.NullPointerException: null
> at
> org.apache.nifi.processors.standard.merge.RecordBin.complete(RecordBin.java:340)
> at
> org.apache.nifi.processors.standard.merge.RecordBinManager.handleCompletedBins(RecordBinManager.java:272)
> at
> org.apache.nifi.processors.standard.merge.RecordBinManager.completeExpiredBins(RecordBinManager.java:238)
> at
> org.apache.nifi.processors.standard.MergeRecord.onTrigger(MergeRecord.java:350)
> at
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1162)
> at
> org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:205)
> at
> org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748){code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)