deniskuzZ opened a new pull request, #6979:
URL: https://github.com/apache/hive/pull/6979

   ### What changes were proposed in this pull request?
   - On a footer cache miss, `LlapParquetIoImpl.getFooterBuffersFromCache` 
reads the last 64 KB of the file once (S3A's
     default readahead) and caches the footer from that buffer. A footer larger 
than that is read on its own.
   - The file is opened with the status already fetched 
(`openFile().withFileStatus()`), so S3A skips the HEAD that
     `open()` issues to learn the length.
   - The length, magic and footer index are checked as 
`ParquetFileReader.readFooter` checks them, before anything is
     cached.
   - `ParquetEncodedDataReader` builds the footer `ParquetReadOptions` once 
instead of once per split.
   
   ### Why are the changes needed?
   - A miss used to cost a seek-and-read of the footer length, then a second 
read of the footer, plus the HEAD from
     `open()`: three object-store requests where one is enough.
   - `ParquetFileReader.readFooter(InputFile, filter)` builds read options for 
a non-Hadoop file on every call, which
     parses the Hadoop default configuration. At TPC-DS 10 TB that was 18.5% of 
q28's LLAP task time (51,134 splits).
     A footer read of a local file goes from 631 to 43 us.
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   `TestParquetEncodedDataReader`:
   - a footer within the tail costs one read; a larger one costs two and 
matches `ParquetFileReader`'s footer
   - a file too short for Parquet, a missing magic, and a footer index outside 
the file are refused and not cached
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

  • [PR] HIVE-30104: LLAP: read a ... deniskuzZ (via GitHub) via gitbox

Reply via email to