[
https://issues.apache.org/jira/browse/HDFS-13232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16393669#comment-16393669
]
Wei Yan commented on HDFS-13232:
--------------------------------
Thanks [~ekanth] for the patch. +1 LGTM.
One minor:
{code:java}
ConnectionPool pool = new ConnectionPool(
conf, TEST_NN_ADDRESS, TEST_USER1, 0, 10);
{code}
The second line space should be 4 spaces (Hadoop uses tab=2).
[~csun] you want to include a test case 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
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]