You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celeborn.apache.org by an...@apache.org on 2023/01/31 07:40:03 UTC

[incubator-celeborn] branch main updated: [CELEBORN-253][MINOR] Fix the wrongly resolve celeborn.ha.master.node.id issue if enable HA (#1188)

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

angerszhuuuu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git


The following commit(s) were added to refs/heads/main by this push:
     new 6e82e7dd [CELEBORN-253][MINOR] Fix the wrongly resolve celeborn.ha.master.node.id issue if enable HA (#1188)
6e82e7dd is described below

commit 6e82e7dd6cccce8b849e2697139c0583a9dcc1d5
Author: Rex(Hui) An <an...@126.com>
AuthorDate: Tue Jan 31 15:39:58 2023 +0800

    [CELEBORN-253][MINOR] Fix the wrongly resolve celeborn.ha.master.node.id issue if enable HA (#1188)
---
 common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala      | 1 +
 common/src/test/scala/org/apache/celeborn/common/CelebornConfSuite.scala | 1 +
 2 files changed, 2 insertions(+)

diff --git a/common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala b/common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala
index 0c04789e..2a838624 100644
--- a/common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala
+++ b/common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala
@@ -574,6 +574,7 @@ class CelebornConf(loadDefaults: Boolean) extends Cloneable with Logging with Se
     val nodeConfPrefix = extractPrefix(HA_MASTER_NODE_HOST.key, "<id>")
     getAllWithPrefix(nodeConfPrefix)
       .map(_._1)
+      .filterNot(_.equals("id"))
       .map(k => extractPrefix(k, "."))
       .distinct
   }
diff --git a/common/src/test/scala/org/apache/celeborn/common/CelebornConfSuite.scala b/common/src/test/scala/org/apache/celeborn/common/CelebornConfSuite.scala
index 0b84998d..a976edd7 100644
--- a/common/src/test/scala/org/apache/celeborn/common/CelebornConfSuite.scala
+++ b/common/src/test/scala/org/apache/celeborn/common/CelebornConfSuite.scala
@@ -152,6 +152,7 @@ class CelebornConfSuite extends CelebornFunSuite {
 
   test("extract masterNodeIds") {
     val conf = new CelebornConf()
+      .set("celeborn.ha.master.node.id", "1")
       .set("celeborn.ha.master.node.1.host", "clb-1")
       .set("celeborn.ha.master.node.2.host", "clb-1")
       .set("celeborn.ha.master.node.3.host", "clb-1")