joseluisll opened a new pull request, #8947:
URL: https://github.com/apache/hadoop/pull/8947

   ### Description of PR
   
   ImageServlet reported why it turned a transfer down only in the reason 
phrase, set through a cast to Jetty's Response. The servlet closes its output 
stream on the way out of every request, which commits the response before the 
container can render an error page, so a container that sends no custom phrase 
leaves the SecondaryNameNode or standby NameNode with a bare status code.
   
   The servlet now writes the reason into the body itself and keeps the phrase 
through setStatus(int, String), without the cast. Util#doGetUrl, 
TransferFsImage's upload and EditLogFileInputStream read the body through 
ResponseDetail before falling back to the phrase.
   
   A refusal found inside a transfer reaches the servlet's own catch as well, 
and finds the response committed. That second report is logged at DEBUG. No 
change on Jetty 9.4: the reason is in both the phrase and the body.
   
   Stacked on #8945 (HADOOP-20003): this branch carries that commit plus the 
fsimage changes, and replaces it once it lands.
   
   ### How was this patch tested?
   
   The changed modules' tests, run by the Yetus precommit and the fork's CI on 
this branch.
   
   ### For code changes:
   
   - [x] Does the title of this PR start with the corresponding JIRA issue id?
   - [ ] Object storage: not applicable, no object store integration touched.
   - [ ] If adding new dependencies to the code: not applicable, no new 
dependency.
   - [ ] If applicable, have you updated the LICENSE files: not applicable.
   
   ### AI Tooling
   
   If an AI tool was used:
   
   - [x] The PR includes the phrase "Contains content generated by <tool>" 
where <tool> is the name of the AI tool used.
   - [x] My use of AI contributions follows the ASF legal policy 
https://www.apache.org/legal/generative-tooling.html
   
   Contains content generated by Claude Code.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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

Reply via email to