[ 
https://issues.apache.org/jira/browse/MAPREDUCE-7539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18090246#comment-18090246
 ] 

ASF GitHub Bot commented on MAPREDUCE-7539:
-------------------------------------------

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

   …ue to uuid mismatch
   
   Fix IFile aggregated log reads after HADOOP-15984 singleton web services.
   
   HADOOP-15984 made HsWebServices a singleton, so 
LogAggregationIndexedFileController is reused across 
/ws/v1/history/aggregatedlogs requests. IFile log meta reads validated UUIDs 
against a cached instance field from the first application, causing aggregated 
logs for other apps to fail until JHS restart.
   
   Derive the expected UUID from the application being read. Add regression 
tests and call postWrite() in test log upload helpers so IFile metadata is 
written.
   
   <!--
     Thanks for sending a pull request!
       1. If this is your first time, please read our contributor guidelines: 
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
       2. Make sure your PR title starts with JIRA issue id, e.g., 
'HADOOP-17799. Your PR title ...'.
   -->
   
   ### Description of PR
   
   
   ### How was this patch tested?
   
   
   ### For code changes:
   
   - [ ] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   ### 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




> JobHistoryServer API fails to serve aggregated logs due to uuid mismatch
> ------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-7539
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-7539
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: jobhistoryserver
>    Affects Versions: 3.5.0
>            Reporter: Brian Goerlitz
>            Assignee: Ferenc Erdelyi
>            Priority: Major
>
> Due to Singleton annotations added in HADOOP-15984 for HSWebServices, the 
> first time an ifile log is read via the {{/ws/v1/history/aggregatedlogs}} 
> API, the UUID of the log is stored in the HSWebServices instance of the 
> {{LogAggregationIndexedFileController}} and used for verification of all 
> future log files. This results in failure to read any aggregated log files 
> belonging to an app that is not the first one accessed after JHS restart.
> {noformat}
> 2026-06-08 20:16:40,368 WARN 
> org.apache.hadoop.yarn.logaggregation.filecontroller.ifile.LogAggregationIndexedFileController:
>  Can not get log meta from the log 
> file:hdfs://nn:8020/tmp/logs/systest/bucket-logs-ifile/0002/application_1780935195539_0002/nm_8041
> The UUID from 
> hdfs://nn:8020/tmp/logs/systest/bucket-logs-ifile/0002/application_1780935195539_0002/nm_8041
>  is not correct. The offset of loaded UUID is 296605
> 2026-06-08 20:16:40,368 WARN 
> org.apache.hadoop.yarn.webapp.GenericExceptionHandler: SERVICE_UNAVAILABLE
> javax.ws.rs.WebApplicationException: HTTP 500 Internal Server Error
>         at 
> org.apache.hadoop.yarn.server.webapp.LogServlet.getContainerLogMeta(LogServlet.java:134)
>         at 
> org.apache.hadoop.yarn.server.webapp.LogServlet.getContainerLogsInfo(LogServlet.java:325)
>         at 
> org.apache.hadoop.yarn.server.webapp.LogServlet.getLogsInfo(LogServlet.java:263)
>         at 
> org.apache.hadoop.mapreduce.v2.hs.webapp.HsWebServices.getAggregatedLogsMeta(HsWebServices.java:521)
> ...
> Caused by: org.apache.hadoop.yarn.webapp.NotFoundException: HTTP 404 Not Found
>         at 
> org.apache.hadoop.yarn.server.webapp.LogServlet.getContainerLogMeta(LogServlet.java:122)
>         ... 86 more
> Caused by: java.lang.Exception: Can not get log meta for request.
>         at 
> org.apache.hadoop.yarn.webapp.NotFoundException.<init>(NotFoundException.java:45)
>         ... 87 more
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to