Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
When a user lists YARN applications with the RM admin CLI, we have one audit log here (https://github.com/apache/hadoop/blob/e40e2d6ad5cbe782c3a067229270738b501ed27e/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ClientRMService.java#L924)
However, a more extensive logging could be added.
This is the call chain, when such a list command got executed (from bottom to top):
org.apache.hadoop.yarn.server.resourcemanager.ClientRMService#getApplications org.apache.hadoop.yarn.client.api.impl.YarnClientImpl#getApplications(java.util.Set<java.lang.String>, java.util.EnumSet<org.apache.hadoop.yarn.api.records.YarnApplicationState>, java.util.Set<java.lang.String>) ApplicationCLI.listApplications(Set<String>, EnumSet<YarnApplicationState>, Set<String>) (org.apache.hadoop.yarn.client.cli) ApplicationCLI.run(String[]) (org.apache.hadoop.yarn.client.cli)
org.apache.hadoop.yarn.server.resourcemanager.ClientRMService#getApplications: This is the place that fits perfectly for adding a more detailed log message about the request or the response (or both).
In my opinion, a trace (or debug) level log would be great at the end of this method, logging the whole response, so any potential issues with the code can be troubleshot more easily.