Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-4262

LZO-scanner fails when reading large index files from S3

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Impala 2.7.0
    • Fix Version/s: Impala 2.8.0
    • Component/s: Backend
    • Labels:

      Description

      The LZO-scanner always expects the index file to be a multiple of sizeof(uint64_t). In a loop, it reads the file 10MB at a time (which is a multiple of sizeof(uint64_t)) and processes this buffer uint64_t bytes at a time. This works fine for HDFS as HDFS returns the entire buffer as requested.

      However, for S3, the internal read() relies on a stream, therefore it sends as many bytes as currently available. This means that the 'bytes read' may not be a multiple of sizeof(uint64_t). This currently causes the scanner to throw an error in this case.

      We need to modify the LZO-scanner logic so that it carries over (buffer_size % sizeof(uint64_t)) bytes every time and process these remaining bytes as a part of the newly filled buffer.

        Activity

        Show
        sailesh Sailesh Mukil added a comment - Commit in: http://github.mtv.cloudera.com/CDH/Impala-lzo/commit/273a8ad36386f1e6f410df9296468b7a4ca54f9c

          People

          • Assignee:
            sailesh Sailesh Mukil
            Reporter:
            sailesh Sailesh Mukil
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development