YARN-11891. Yarn logs command hangs for running applications #8057
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.
Description of PR
JIRA: YARN-11891. Yarn logs command hangs for running applications.
filter() method inside the ClientJerseyRetryFilter class, calls checkUrlConnectivity() in a while loop, If there is any issue with connectivity, it decrements the leftRetries till it becomes 0 and throws an Exception, but if it succeeds it keeps on spinning inside the infinite while loop, so added a return after checkUrlConnectivity().
After fixing the above issue, the yarn logs command was throwing below error.
Can not find any log file matching the pattern: [ALL] for the container: container_id within the application: app_id
The XML response of /ws/v1/node/containers/<container_id>/logs is
So in getContainerLogFiles(), an additional getJSONObject("containerLogsInfoes") has been added to ensure the XML response is parsed properly
How was this patch tested?
Validated yarn logs -applicationId for running and completed applications.
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?