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

ASF GitHub Bot commented on HADOOP-20085:
-----------------------------------------

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

   ### Description of PR
   The `Slow RPC` log printed by `Server#logSlowRpcCalls` only identifies the 
caller by `ip:port`. To find the user or job behind a slow call we have to 
correlate with the HDFS audit log by address and time. That does not work for 
RPCs that have no audit log (DataNode, YARN, ...), and with RBF the address 
seen by the NameNode is the Router's.
   
   This PR adds the remote user and the caller context to the log:
   ```
   Slow RPC : sleep took 3002 MILLISECONDS to process from client Call#20014 
Retry#0 testProto2.sleep from 127.0.0.1:56249, user foo (auth:SIMPLE), 
callerContext spark_app_xxx, the processing detail is ..., and the threshold 
time is 1000 MILLISECONDS.
   ```
   
   ### How was this patch tested?
   Extended `TestProtoBufRpc#testLogSlowRPC`
   
   ### For code changes:
   
   - [ ] Does the title of this PR start 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? *Note: 
Automated CI
         testing doesn't cover all cases so manual testing with cloud storage 
is still
         required.*
   - [ ] 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:
   
   - [ ] The PR includes the phrase "Contains content generated by <tool>"
         where <tool> is the name of the AI tool used.
   - [ ] My use of AI contributions follows the ASF legal policy
         https://www.apache.org/legal/generative-tooling.html
   




> Add user and caller context to the Slow RPC log
> -----------------------------------------------
>
>                 Key: HADOOP-20085
>                 URL: https://issues.apache.org/jira/browse/HADOOP-20085
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: dzcxzl
>            Priority: Minor
>




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

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

Reply via email to