HIVE-29703: LLAP: Parquet footer larger than alloc.max fails to cache — RuntimeException: Trying to allocate N; max is M#6584
Open
deniskuzZ wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an LLAP MetadataCache allocation bug when caching file footers via the InputStream path, specifically for footers at or above allocator.getMaxAllocation(), preventing failures like “Trying to allocate N; max is M”.
Changes:
- Adjust split logic to treat
length == maxAllocas a “full-buffer” case (avoid returning an empty wrapper). - Allocate the remainder buffer using
smallSize(remainder length) instead of the fulllengthwhen footers are split. - Refactor
TestOrcMetadataCacheto reuse a sharedMetadataCachefactory and add stream-based regression tests for== maxAllocand> maxAlloc.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| llap-server/src/java/org/apache/hadoop/hive/llap/io/metadata/MetadataCache.java | Fixes buffer-splitting and remainder allocation so stream footers at/over max alloc are cached without over-allocation or empty-wrapper behavior. |
| llap-server/src/test/org/apache/hadoop/hive/llap/cache/TestOrcMetadataCache.java | Adds regression coverage for stream footer sizes equal to and larger than MAX_ALLOC, and reduces test duplication via helper constructors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… — RuntimeException: Trying to allocate N; max is M
Contributor
|
LGTM +1 |
Aggarwal-Raghav
approved these changes
Jul 8, 2026
abstractdog
requested changes
Jul 13, 2026
abstractdog
left a comment
Contributor
There was a problem hiding this comment.
only some minor nits, ideas, rest LGTM
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What changes were proposed in this pull request?
Why are the changes needed?
When LLAP caches a Parquet file footer whose size exceeds hive.llap.io.allocator.alloc.max, the query fails with:
Does this PR introduce any user-facing change?
No
How was this patch tested?