Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-18855 VectorIO API tuning/stabilization
  3. HADOOP-19101

Vectored Read into off-heap buffer broken in fallback implementation

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 3.4.0, 3.3.6
    • 3.3.9, 3.5.0, 3.4.1
    • fs, fs/azure
    • None
    • Hide
      PositionedReadable.readVectored() will read incorrect data when reading from hdfs, azure abfs and other stores when given a direct buffer allocator.

      For cross-version compatibility, use on-heap buffer allocators only
      Show
      PositionedReadable.readVectored() will read incorrect data when reading from hdfs, azure abfs and other stores when given a direct buffer allocator. For cross-version compatibility, use on-heap buffer allocators only

    Description

      VectoredReadUtils.readInDirectBuffer() always starts off reading at position zero even when the range is at a different offset. As a result: you can get incorrect information.

      Thanks for this is straightforward: we pass in a FileRange and use its offset as the starting position.

      However, this does mean that all shipping releases 3.3.5-3.4.0 cannot safely read vectorIO into direct buffers through HDFS, ABFS or GCS. Note that we have never seen this in production because the parquet and ORC libraries both read into on-heap storage.

      Those libraries needs to be audited to make sure that they never attempt to read into off-heap DirectBuffers. This is a bit trickier than you would think because an allocator is passed in. For PARQUET-2171 we will

      • only invoke the API on streams which explicitly declare their support for the API (so fallback in parquet itself)
      • not invoke when direct buffer allocation is in use.

      Attachments

        Issue Links

          Activity

            People

              stevel@apache.org Steve Loughran
              stevel@apache.org Steve Loughran
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: