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

Íñigo Goiri commented on HDFS-13232:
------------------------------------

Avoid removing the extra line in {{TestConnectionManager}}.
Other than that it looks good to me.
[~csun] do you mind confirming the test that was missing in HDFS-12330 is 
enough here?

> RBF: ConnectionPool should return first usable connection
> ---------------------------------------------------------
>
>                 Key: HDFS-13232
>                 URL: https://issues.apache.org/jira/browse/HDFS-13232
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Wei Yan
>            Assignee: Ekanth S
>            Priority: Minor
>         Attachments: HDFS-13232.001.patch, HDFS-13232.002.patch
>
>
> In current ConnectionPool.getConnection(), it will return the first active 
> connection:
> {code:java}
> for (int i=0; i<size; i++) {
>   int index = (threadIndex + i) % size;
>   conn = tmpConnections.get(index);
>   if (conn != null && !conn.isUsable()) {
>     return conn;
>   }
> }
> {code}
> Here "!conn.isUsable()" should be "conn.isUsable()".



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to