Huginn-kio opened a new pull request, #8665:
URL: https://github.com/apache/hbase/pull/8665

   ## HBASE-27049
   
   ### Summary
   
   Avoid an intermediate heap buffer when reading decompressed stream data into 
an on-heap `ByteBuff`.
   
   ### Root cause
   
   The stream fallback in `HFileBlockDefaultDecodingContext` uses 
`BlockIOUtils.readFullyWithHeapBuffer`, which allocates a temporary heap buffer 
and copies each read into the destination `ByteBuff`. This adds an avoidable 
copy for on-heap destinations.
   
   ### Fix
   
   - Read directly into the backing array when the destination `ByteBuff` 
exposes one.
   - Preserve the existing temporary-buffer fallback for direct or non-array 
`ByteBuff` instances.
   - Use the new helper for compressed stream fallback and uncompressed stream 
reads.
   - Add regression coverage for both the direct-read and fallback paths.
   
   ### Compatibility
   
   - Public API impact: none; `BlockIOUtils` remains internal.
   - Configuration impact: none.
   - Persisted file format impact: none.
   - Wire format impact: none.
   
   ### Testing
   
   - `mvn -pl hbase-server -am -Dtest=TestBlockIOUtils -DfailIfNoTests=false 
-DskipITs test`
   - `mvn -pl hbase-common -DskipTests 
-Dcheckstyle.includes="**/BlockIOUtils.java,**/HFileBlockDefaultDecodingContext.java"
 checkstyle:check`
   - `mvn -pl hbase-server -DskipTests 
-Dcheckstyle.includes="**/TestBlockIOUtils.java" checkstyle:check`
   


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

Reply via email to