You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ke...@apache.org on 2021/11/01 04:18:49 UTC

[dolphinscheduler] branch dev updated: [DS-6653][Server] fix netty create too many channels (#6654)

This is an automated email from the ASF dual-hosted git repository.

kerwin pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new daca3ba  [DS-6653][Server] fix netty create too many channels (#6654)
daca3ba is described below

commit daca3baf6662b9bcf3de856722ece79aad753773
Author: wind <ca...@users.noreply.github.com>
AuthorDate: Mon Nov 1 12:18:39 2021 +0800

    [DS-6653][Server] fix netty create too many channels (#6654)
    
    Co-authored-by: caishunfeng <53...@qq.com>
---
 .../org/apache/dolphinscheduler/remote/utils/Host.java  | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/utils/Host.java b/dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/utils/Host.java
index 359baef..2163e9c 100644
--- a/dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/utils/Host.java
+++ b/dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/utils/Host.java
@@ -20,6 +20,7 @@ package org.apache.dolphinscheduler.remote.utils;
 import static org.apache.dolphinscheduler.common.Constants.COLON;
 
 import java.io.Serializable;
+import java.util.Objects;
 
 /**
  * server address
@@ -134,4 +135,20 @@ public class Host implements Serializable {
                 + '}';
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        Host host = (Host) o;
+        return port == host.port && Objects.equals(address, host.address) && Objects.equals(ip, host.ip);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(address, ip, port);
+    }
 }