You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Jing Zhao (JIRA)" <ji...@apache.org> on 2016/09/01 17:54:20 UTC

[jira] [Commented] (HADOOP-13546) Override equals and hashCode to avoid connection leakage

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

Jing Zhao commented on HADOOP-13546:
------------------------------------

Comments on the latest patch:
# TestConnectionRetryPolicy.java does not have ASF license.
# The following code can be simplified as "return (obj instanceof WrapperRetryPolicy) && this.multipleLinearRandomRetry.equals(((WrapperRetryPolicy) obj).multipleLinearRandomRetry);"
{code}
      } else if (obj == null || obj.getClass() != this.getClass()) {
        return false;
      } else {
        return this.multipleLinearRandomRetry
            .equals(((WrapperRetryPolicy) obj).multipleLinearRandomRetry);
      }
{code}
# The new javadoc is not accurate. To ignore remoteExceptionToRetry is mainly because our motivation for overriding equals and hashCode. The motivation here is for connection reuse, and remoteExceptionToRetry does not affect connection failure handling.
# In {{testDefaultRetryPolicyReuseConnections}}, we can add another test case to check default retry policy with non-null remoteExceptionToRetry case.

> Override equals and hashCode to avoid connection leakage
> --------------------------------------------------------
>
>                 Key: HADOOP-13546
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13546
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: ipc
>    Affects Versions: 2.7.0
>            Reporter: Xiaobing Zhou
>            Assignee: Xiaobing Zhou
>         Attachments: HADOOP-13546-HADOOP-13436.000.patch, HADOOP-13546-HADOOP-13436.001.patch, HADOOP-13546-HADOOP-13436.002.patch, HADOOP-13546-HADOOP-13436.003.patch, HADOOP-13546-HADOOP-13436.004.patch, HADOOP-13546-HADOOP-13436.005.patch, HADOOP-13546-HADOOP-13436.006.patch
>
>
> Override #equals and #hashcode to ensure multiple instances are equivalent. They eventually
> share the same RPC connection given the other arguments of constructing ConnectionId are
> the same.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org