YARN-11956: Register RMQueueAclInfo for RM REST JSON serialization#8449
YARN-11956: Register RMQueueAclInfo for RM REST JSON serialization#8449riya2305 wants to merge 2 commits intoapache:trunkfrom
Conversation
Hean-Chhinling
left a comment
There was a problem hiding this comment.
Thanks for the patch, @riya2305.
LGTM!
|
💔 -1 overall
This message was automatically generated. |
|
Thanks Riya for the fix! what do you think can we modify the IncludeRootJsonProvider to handle scenarios when DTO not present in any list? So kinda modify this
to
|
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
Interesting idea — one concern: with that condition, wouldn’t IncludeRoot effectively claim every type that isn’t explicitly unwrapped, so DTOs default to wrapped JSON (extra root object)? That might fix the missing writer but still change the response shape for clients. |
That is a good idea. Example: Not with root rmQueueAclInfo But please correct me if I am mistaken |
You’re not mistaken for this endpoint, which is why the fix registers it under CONST_UNWRAPPED_CLASSES. |
|
@slfan1989 can you please review this PR and help merge it ? |
|
@brumi1024 can you please review this PR and help merge it ? |
|
LGTM. |
can you please merge this pr? @slfan1989 |
Description of PR
JIRA: YARN-11956: Register RMQueueAclInfo for RM REST JSON serialization
The RM queue access REST call (…/queues/{queue}/access?user=…) returns RMQueueAclInfo, which was missing from the MOXy JSON allowlist in ClassSerialisationConfig, so Accept: application/json could fail with no MessageBodyWriter. Register RMQueueAclInfo there so that endpoint can return JSON.
How was this patch tested?
tested manually:
curl -sS -H 'Accept: application/json'
'http://localhost:8088/ws/v1/cluster/queues/default/access?user=yarn'
With the fix: HTTP 200, JSON body ( unwrapped, no rmQueueAclInfo wrapper )
Without the fix: error response mentioning MessageBodyWriter not found for RMQueueAclInfo
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?AI Tooling
If an AI tool was used:
where is the name of the AI tool used.
https://www.apache.org/legal/generative-tooling.html