You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/05/16 12:43:27 UTC

[GitHub] [ozone] adoroszlai commented on a diff in pull request #3186: HDDS-5916. Datanodes stuck in leader election in Kubernetes

adoroszlai commented on code in PR #3186:
URL: https://github.com/apache/ozone/pull/3186#discussion_r873659932


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/events/SCMEvents.java:
##########
@@ -157,6 +157,13 @@ public final class SCMEvents {
   public static final TypedEvent<DatanodeDetails> NEW_NODE =
       new TypedEvent<>(DatanodeDetails.class, "New_Node");
 
+  /**
+   * This event will be triggered whenever a datanode is registered with
+   * SCM with a different Ip or host name.
+   */
+  public static final TypedEvent<DatanodeDetails> NODE_IP_OR_HOSTNAME_UPDATE =
+          new TypedEvent<>(DatanodeDetails.class, "Node_Ip_Or_Hostname_Update");

Review Comment:
   Instead of "IP or hostname" I think we can simply say "address", here and elsewhere, too (e.g. in `NodeIpOrHostnameUpdateHandler`).



##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/ratis/RatisHelper.java:
##########
@@ -369,6 +384,12 @@ public static Long getMinReplicatedIndex(
         .min(Long::compareTo).orElse(null);
   }
 
+  private static boolean datanodeUseHostName() {
+    return CONF.getBoolean(
+            DFSConfigKeys.DFS_DATANODE_USE_DN_HOSTNAME,
+            DFSConfigKeys.DFS_DATANODE_USE_DN_HOSTNAME_DEFAULT);

Review Comment:
   I think we should have an Ozone-specific configuration property for this.  See also:
   
   https://github.com/apache/ozone/blob/ed470082e650a2ab9ac269e70ad737923bae6cb4/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/DFSConfigKeysLegacy.java#L19-L26



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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