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

Leon Gao commented on HDFS-14927:
---------------------------------

Ah I got your question.

How it works is that TestRouterClientRejectOverload#375:
{code:java}
simulateSlowNamenode(cluster.getCluster().getNameNode(0), 2);{code}
Above makes sure that renewLease() call will take at least 2 seconds to finish. 
This means the async thread will keep the connection working for at least 2 
seconds in background.

The metrics validation happens in 0.5 seconds, so it will for sure drop in the 
2 seconds interval and get one active connection.

The reason to sleep for 0.5 seconds is to make sure the connection is already 
active in the connection pool, which might just take some milliseconds on my 
laptop. The wait makes sure the test is less likely to be flaky :)

 

I was trying sync call at the beginning which doesn't seem to be working well.. 
Maybe the time connection stayed afterward was too short to make the test 
consistent.

 

> RBF: Add metrics for async callers thread pool
> ----------------------------------------------
>
>                 Key: HDFS-14927
>                 URL: https://issues.apache.org/jira/browse/HDFS-14927
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: rbf
>            Reporter: Leon Gao
>            Assignee: Leon Gao
>            Priority: Minor
>         Attachments: HDFS-14927.001.patch, HDFS-14927.002.patch, 
> HDFS-14927.003.patch, HDFS-14927.004.patch, HDFS-14927.005.patch
>
>
> It is good to add some monitoring on the async caller thread pool to handle 
> fan-out RPC client requests, so we know the utilization and when to bump up 
> dfs.federation.router.client.thread-size



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to