Hi, Matthias

May I ask what is your previous ORC version you succeeded before?

Dongjoon

On 2022/06/12 14:32:32 Matthias Meier wrote:
> Hi,
> 
> we are using the Apache ORC library to generate ORC files. That works
> generally well but every now and then we run into two kinds of exceptions
> coming from the ORC writer, on one hand a NullPointerException and on the
> other hand an IOException caused by an IllegalArgumentException.
> 
> I only get these exceptions sporadically about once a week when processing
> production data (while writing millions of very similar rows during the
> same time without any problem). Up to now I was not able to reproduce the
> problem in a test or find out what aspect in the production data causes
> this. (Note that in our system the production data which has been used to
> generate the ORC file is not persistently stored and not easily available
> anymore after the problem has happened.)
> 
> However, by now I'm quite sure that it's not a single record/row being
> written which is the cause but rather certain sequences of (possibly
> hundred thousands) of records/rows. I'm not sure if it is a bug in our code
> or a bug in the Apache ORC library, but I wouldn't know what to do
> differently in our code.
> 
> The NPE looks like this:
> 
> java.io.IOException: Problem adding row to
> file:/tmp/TemporaryDiskFileHandler-220511-151014-8678865386464979027/cmd-220511-154712-17198614794670643856/tmp-220511-154712-1756785427558352227.file
> at org.apache.orc.impl.WriterImpl.addRowBatch(WriterImpl.java:723)
> at
> io.wallee.analyticsserver.job.util.orc.AsOrcWriter.flushBatch(AsOrcWriter.java:201)
> at
> io.wallee.analyticsserver.job.util.orc.AsOrcWriter.close(AsOrcWriter.java:155)
> [... SNIP ...]
> Caused by: java.lang.NullPointerException
> 
> Interestingly I don't get any stack trace for the NPE. I tried in tests to
> write records/rows with any combination of null values I could think of,
> but I never saw an NPE like this in the tests, only sometimes in production.
> 
> The  IOException/IllegalArgumentException looks like this:
> 
> java.io.IOException: Problem adding row to
> file:/tmp/TemporaryDiskFileHandler-220525-060004-17205419383800653529/cmd-220525-071515-1571725702009800891/tmp-220525-071515-16370952990878138938.file
> at org.apache.orc.impl.WriterImpl.addRowBatch(WriterImpl.java:723)
> at
> io.wallee.analyticsserver.job.util.orc.AsOrcWriter.flushBatch(AsOrcWriter.java:218)
> at
> io.wallee.analyticsserver.job.util.orc.AsOrcWriter.close(AsOrcWriter.java:163)
> [... SNIP ...]
> Caused by: java.lang.IllegalArgumentException: Out of bounds decimal64
> 1000000000000000000
> at
> org.apache.orc.impl.ColumnStatisticsImpl$Decimal64StatisticsImpl.updateDecimal64(ColumnStatisticsImpl.java:1309)
> at
> org.apache.orc.impl.ColumnStatisticsImpl$Decimal64StatisticsImpl.updateDecimal(ColumnStatisticsImpl.java:1292)
> at
> org.apache.orc.impl.writer.DecimalTreeWriter.writeBatch(DecimalTreeWriter.java:103)
> at
> org.apache.orc.impl.writer.DecimalTreeWriter.writeBatch(DecimalTreeWriter.java:163)
> at
> org.apache.orc.impl.writer.StructTreeWriter.writeRootBatch(StructTreeWriter.java:56)
> at org.apache.orc.impl.WriterImpl.addRowBatch(WriterImpl.java:699)
> ... 17 more
> 
> I tried in tests to write BigDecimal values of size 1000000000000000000 and
> even much bigger, but I could not reproduce this problem.
> 
> I attached the sources of our AsOrcWriter class for reference. (It is
> pretty much self-containing and the code calling it should not matter
> much.) We are currently using org.apache.orc:orc-core:1.7.3, but I plan to
> upgrade to the latest version in the coming week (though I don't have much
> hope that this will fix the problems).
> 
> As I am trying to fix these issues for two weeks now without any success I
> would be very happy for any kind of help or hint what I could do to fix it.
> 
> Greetings,
> Matthias
> 
> 
> -- 
> Matthias Meier
> Software Developer / CISO
> M + 41 78 752 67 86
> 
> wallee.com
> Disclaimer <https://wallee.com/disclaimer.html>   •   Legal information
> <https://wallee.com/imprint.html>
> 

Reply via email to