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

Bryan Bende commented on NIFI-903:
----------------------------------

+1, patch addresses the NPE shown in the ticket, passes contrib-check.

One note, when I filled up the partition that the provenance repo was using, 
and then deleted some other files to make space again, the logs continuously 
showed warnings about trying to merge journal files that were not found. I 
suspect these were the files it tried to write when hitting the IOException so 
it makes sense This didn't seem to be affecting anything and went away when I 
restarted, but just wanted to point it out.


> If provenance repository runs out of disk space, it will throw a 
> NullPointerException
> -------------------------------------------------------------------------------------
>
>                 Key: NIFI-903
>                 URL: https://issues.apache.org/jira/browse/NIFI-903
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>             Fix For: 0.3.0
>
>         Attachments: 
> 0001-NIFI-903-Check-for-null-value-before-trying-to-close.patch
>
>
> I allowed my Provenance Repository to run out of disk space. When it attempts 
> to roll over, I started getting the following stack trace:
> {noformat}
> 2015-08-27 16:00:04,880 ERROR [Provenance Repository Rollover Thread-2] 
> o.a.n.p.PersistentProvenanceRepository
> java.io.IOException: No space left on device
>         at java.io.FileOutputStream.writeBytes(Native Method) ~[na:1.8.0_45]
>         at java.io.FileOutputStream.write(FileOutputStream.java:326) 
> ~[na:1.8.0_45]
>         at 
> org.apache.nifi.stream.io.ByteCountingOutputStream.write(ByteCountingOutputStream.java:49)
>  ~[nifi-utils-0.3.0-SNAPSHOT.jar:0.3.0-SNAPSHOT]
>         at 
> org.apache.nifi.stream.io.ByteCountingOutputStream.write(ByteCountingOutputStream.java:44)
>  ~[nifi-utils-0.3.0-SNAPSHOT.jar:0.3.0-SNAPSHOT]
>         at 
> org.apache.nifi.stream.io.NonCloseableOutputStream.write(NonCloseableOutputStream.java:34)
>  ~[nifi-utils-0.3.0-SNAPSHOT.jar:0.3.0-SNAPSHOT]
>         at 
> java.util.zip.GZIPOutputStream.writeHeader(GZIPOutputStream.java:182) 
> ~[na:1.8.0_45]
>         at java.util.zip.GZIPOutputStream.<init>(GZIPOutputStream.java:94) 
> ~[na:1.8.0_45]
>         at java.util.zip.GZIPOutputStream.<init>(GZIPOutputStream.java:109) 
> ~[na:1.8.0_45]
>         at 
> org.apache.nifi.stream.io.GZIPOutputStream.<init>(GZIPOutputStream.java:36) 
> ~[nifi-utils-0.3.0-SNAPSHOT.jar:0.3.0-SNAPSHOT]
>         at 
> org.apache.nifi.provenance.StandardRecordWriter.resetWriteStream(StandardRecordWriter.java:126)
>  ~[nifi-persistent-provenance-repository-0.3.0-SNAPSHOT.jar:0.3.0-SNAPSHOT]
>         at 
> org.apache.nifi.provenance.StandardRecordWriter.writeHeader(StandardRecordWriter.java:93)
>  ~[nifi-persistent-provenance-repository-0.3.0-SNAPSHOT.jar:0.3.0-SNAPSHOT]
>         at 
> org.apache.nifi.provenance.PersistentProvenanceRepository.mergeJournals(PersistentProvenanceRepository.java:1563)
>  ~[nifi-persistent-provenance-repository-0.3.0-SNAPSHOT.jar:0.3.0-SNAPSHOT]
>         at 
> org.apache.nifi.provenance.PersistentProvenanceRepository$8.run(PersistentProvenanceRepository.java:1196)
>  ~[nifi-persistent-provenance-repository-0.3.0-SNAPSHOT.jar:0.3.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]
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  [na:1.8.0_45]
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  [na:1.8.0_45]
>         at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
>         Suppressed: java.lang.NullPointerException: null
>                 at 
> org.apache.nifi.provenance.StandardRecordWriter.close(StandardRecordWriter.java:277)
>  ~[nifi-persistent-provenance-repository-0.3.0-SNAPSHOT.jar:0.3.0-SNAPSHOT]
>                 at 
> org.apache.nifi.provenance.PersistentProvenanceRepository.mergeJournals(PersistentProvenanceRepository.java:1672)
>  ~[nifi-persistent-provenance-repository-0.3.0-SNAPSHOT.jar:0.3.0-SNAPSHOT]
>                 ... 8 common frames omitted
> {noformat}
> While the IOException indicating out of disk space is expected, the 
> suppressed NullPointerException is not and needs to be addressed.



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

Reply via email to