jojochuang commented on code in PR #8989:
URL: https://github.com/apache/ozone/pull/8989#discussion_r2312845560


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java:
##########
@@ -380,6 +381,24 @@ public static Collection<String> 
getActiveOMNodeIds(ConfigurationSource conf,
     return nodeIds;
   }
 
+  public static Collection<String> getListenerOMNodeIds(
+      ConfigurationSource conf, String omServiceId) {
+    String listenerNodesKeyWithServiceIdSuffix =
+        ConfUtils.addKeySuffixes(OZONE_OM_LISTENER_NODES_KEY, omServiceId);
+    HashSet<String> listenerNodeIds = new HashSet<>(
+        conf.getTrimmedStringCollection(listenerNodesKeyWithServiceIdSuffix));
+    
listenerNodeIds.addAll(conf.getTrimmedStringCollection(OZONE_OM_LISTENER_NODES_KEY));
+    return listenerNodeIds;
+  }
+
+  public static Collection<String> getActiveNonListenerOMNodeIds(

Review Comment:
   ```suggestion
     /**
    * Returns active OM node IDs that are not listener nodes for the given 
service ID.
    *
    * @param conf Configuration source
    * @param omServiceId OM service ID
    * @return Collection of active non-listener node IDs
    */
     public static Collection<String> getActiveNonListenerOMNodeIds(
   ```



##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java:
##########
@@ -380,6 +381,24 @@ public static Collection<String> 
getActiveOMNodeIds(ConfigurationSource conf,
     return nodeIds;
   }
 
+  public static Collection<String> getListenerOMNodeIds(

Review Comment:
   ```suggestion
     /**
    * Returns a collection of OM node IDs configured as listeners
    * for the given OM service ID. The result aggregates IDs from both
    * the service-specific and global listener configuration keys.
    *
    * @param conf Configuration source to read OM node settings.
    * @param omServiceId The OM service ID to scope the search.
    * @return A collection of OM node IDs configured as listeners.
    */
   public static Collection<String> getListenerOMNodeIds(
       ConfigurationSource conf, String omServiceId) {
       // method body...
   }
     public static Collection<String> getListenerOMNodeIds(
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to