You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jason Altekruse (JIRA)" <ji...@apache.org> on 2015/06/26 19:26:04 UTC

[jira] [Comment Edited] (DRILL-3312) PageReader.allocatePageData() calls BufferAllocator.buffer(int) but doesn't check if the result is null

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

Jason Altekruse edited comment on DRILL-3312 at 6/26/15 5:25 PM:
-----------------------------------------------------------------

Do we ever expect users of this method to do anything with a null return besides using it to trigger an out of memory exception? Is there any reason why we can't have the allocator do the null check and just throw an error rather than ever returning null?


was (Author: jaltekruse):
Do we ever expect users of this method to do anything with a null return besides using it to trigger an out of memory exception? Is there any reason why we want have the allocator do the null check and just throw an error rather than ever returning null?

> PageReader.allocatePageData() calls BufferAllocator.buffer(int) but doesn't check if the result is null
> -------------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-3312
>                 URL: https://issues.apache.org/jira/browse/DRILL-3312
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Parquet
>            Reporter: Deneche A. Hakim
>            Assignee: Hanifi Gunes
>             Fix For: 1.2.0
>
>         Attachments: DRILL-3312.1.patch.txt
>
>
> Trying to reproduce DRILL-3241, Drill returns the following error:
> {noformat}
> SYSTEM ERROR: org.apache.drill.common.exceptions.DrillRuntimeException: Error in parquet record reader.
> Message: 
> Hadoop path: /Users/hakim/MapR/data/tpcds100/parquet/store_sales/1_10_1.parquet
> Total records read: 0
> Mock records read: 0
> Records to read: 21845
> Row group index: 0
> Records in row group: 3348801
> Parquet Metadata: ParquetMetaData{FileMetaData{schema: message root {
>    ...omitted text
> }
> , metadata: {}}, blocks: [...omitted text]}
> Fragment 3:0
> [Error Id: 0f9ba088-3091-4166-b46f-53ab60d364f8 on 10.250.50.54:31010]{noformat}
> The logs contain more information about the cause:
> {noformat}
> Caused by: java.lang.NullPointerException
> 	at org.apache.drill.exec.store.parquet.DirectCodecFactory$FullDirectDecompressor.decompress(DirectCodecFactory.java:238) ~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
> 	at org.apache.drill.exec.store.parquet.columnreaders.PageReader.next(PageReader.java:230) ~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
> 	at org.apache.drill.exec.store.parquet.columnreaders.NullableColumnReader.processPages(NullableColumnReader.java:76) ~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
> 	at org.apache.drill.exec.store.parquet.columnreaders.ParquetRecordReader.readAllFixedFields(ParquetRecordReader.java:380) ~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
> 	at org.apache.drill.exec.store.parquet.columnreaders.ParquetRecordReader.next(ParquetRecordReader.java:423) ~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>    ...
> {noformat}
> Just before that line, PageReader.next() calls the following method:
> {noformat}
>   private void allocatePageData(int size) {
>     Preconditions.checkArgument(pageData == null);
>     pageData = parentColumnReader.parentReader.getOperatorContext().getAllocator().buffer(size);
>   }
> {noformat}
> this method should check the output of BufferAllocator.buffer(int) to make sure the buffer was successfully allocated.



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