[jira] [Commented] (FLINK-4547) when call connect method in AkkaRpcService using same address and same rpc gateway class, the returned gateways are equal with respect to equals and hashCode
[ https://issues.apache.org/jira/browse/FLINK-4547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15715563#comment-15715563 ] Stephan Ewen commented on FLINK-4547: - [~jinyu.zj] Is this issue complete? Can it be closed? > when call connect method in AkkaRpcService using same address and same rpc > gateway class, the returned gateways are equal with respect to equals and > hashCode > - > > Key: FLINK-4547 > URL: https://issues.apache.org/jira/browse/FLINK-4547 > Project: Flink > Issue Type: Sub-task > Components: Distributed Coordination >Reporter: zhangjing >Assignee: zhangjing > > Now every time call connect method in AkkaRpcService class using same address > and same rpc gateway class, the return gateway object is totally different > with each other which equals and hashcode are not same. > Maybe it’s reasonable to have the same result (equals return true, and > hashcode is same) when using the same address and same Gateway class. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4547) when call connect method in AkkaRpcService using same address and same rpc gateway class, the returned gateways are equal with respect to equals and hashCode
[ https://issues.apache.org/jira/browse/FLINK-4547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15581039#comment-15581039 ] ASF GitHub Bot commented on FLINK-4547: --- Github user beyond1920 closed the pull request at: https://github.com/apache/flink/pull/2455 > when call connect method in AkkaRpcService using same address and same rpc > gateway class, the returned gateways are equal with respect to equals and > hashCode > - > > Key: FLINK-4547 > URL: https://issues.apache.org/jira/browse/FLINK-4547 > Project: Flink > Issue Type: Sub-task > Components: Distributed Coordination >Reporter: zhangjing >Assignee: zhangjing > > Now every time call connect method in AkkaRpcService class using same address > and same rpc gateway class, the return gateway object is totally different > with each other which equals and hashcode are not same. > Maybe it’s reasonable to have the same result (equals return true, and > hashcode is same) when using the same address and same Gateway class. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4547) when call connect method in AkkaRpcService using same address and same rpc gateway class, the returned gateways are equal with respect to equals and hashCode
[ https://issues.apache.org/jira/browse/FLINK-4547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15515323#comment-15515323 ] ASF GitHub Bot commented on FLINK-4547: --- Github user beyond1920 commented on the issue: https://github.com/apache/flink/pull/2455 @tillrohrmann , I rebase the PR. Thanks. > when call connect method in AkkaRpcService using same address and same rpc > gateway class, the returned gateways are equal with respect to equals and > hashCode > - > > Key: FLINK-4547 > URL: https://issues.apache.org/jira/browse/FLINK-4547 > Project: Flink > Issue Type: Sub-task > Components: Distributed Coordination >Reporter: zhangjing >Assignee: zhangjing > > Now every time call connect method in AkkaRpcService class using same address > and same rpc gateway class, the return gateway object is totally different > with each other which equals and hashcode are not same. > Maybe it’s reasonable to have the same result (equals return true, and > hashcode is same) when using the same address and same Gateway class. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4547) when call connect method in AkkaRpcService using same address and same rpc gateway class, the returned gateways are equal with respect to equals and hashCode
[ https://issues.apache.org/jira/browse/FLINK-4547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15470051#comment-15470051 ] ASF GitHub Bot commented on FLINK-4547: --- Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/2455#discussion_r77782622 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaInvocationHandler.java --- @@ -189,7 +191,49 @@ public void stop() { rpcEndpoint.tell(Processing.STOP, ActorRef.noSender()); } - // + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + + if (o == null) { + return false; + } + + if(Proxy.isProxyClass(o.getClass())) { + return o.equals(this); + } --- End diff -- Alright, I understand that now :-). > when call connect method in AkkaRpcService using same address and same rpc > gateway class, the returned gateways are equal with respect to equals and > hashCode > - > > Key: FLINK-4547 > URL: https://issues.apache.org/jira/browse/FLINK-4547 > Project: Flink > Issue Type: Sub-task > Components: Distributed Coordination >Reporter: zhangjing >Assignee: zhangjing > > Now every time call connect method in AkkaRpcService class using same address > and same rpc gateway class, the return gateway object is totally different > with each other which equals and hashcode are not same. > Maybe it’s reasonable to have the same result (equals return true, and > hashcode is same) when using the same address and same Gateway class. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4547) when call connect method in AkkaRpcService using same address and same rpc gateway class, the returned gateways are equal with respect to equals and hashCode
[ https://issues.apache.org/jira/browse/FLINK-4547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15469997#comment-15469997 ] ASF GitHub Bot commented on FLINK-4547: --- Github user beyond1920 commented on the issue: https://github.com/apache/flink/pull/2455 @tillrohrmann @StephanEwen , thanks for your review. I changed the code based on your comment, including two points: 1. Change the JIRA and the PR subject line to better reflect the actual changes. 2. Modify the testcase which connect to invalid address in AkkaRpcServiceTest. > when call connect method in AkkaRpcService using same address and same rpc > gateway class, the returned gateways are equal with respect to equals and > hashCode > - > > Key: FLINK-4547 > URL: https://issues.apache.org/jira/browse/FLINK-4547 > Project: Flink > Issue Type: Sub-task > Components: Distributed Coordination >Reporter: zhangjing >Assignee: zhangjing > > Now every time call connect method in AkkaRpcService class using same address > and same rpc gateway class, the return gateway object is totally different > with each other which equals and hashcode are not same. > Maybe it’s reasonable to have the same result (equals return true, and > hashcode is same) when using the same address and same Gateway class. -- This message was sent by Atlassian JIRA (v6.3.4#6332)