Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-3312

PageReader.allocatePageData() calls BufferAllocator.buffer(int) but doesn't check if the result is null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • 1.2.0
    • Storage - Parquet
    • None

    Description

      Trying to reproduce DRILL-3241, Drill returns the following error:

      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]

      The logs contain more information about the cause:

      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]
         ...
      

      Just before that line, PageReader.next() calls the following method:

        private void allocatePageData(int size) {
          Preconditions.checkArgument(pageData == null);
          pageData = parentColumnReader.parentReader.getOperatorContext().getAllocator().buffer(size);
        }
      

      this method should check the output of BufferAllocator.buffer(int) to make sure the buffer was successfully allocated.

      Attachments

        1. DRILL-3312.1.patch.txt
          3 kB
          Abdel Hakim Deneche

        Issue Links

          Activity

            People

              adeneche Abdel Hakim Deneche
              adeneche Abdel Hakim Deneche
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: