[ 
https://issues.apache.org/jira/browse/HDFS-16688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17579008#comment-17579008
 ] 

ASF GitHub Bot commented on HDFS-16688:
---------------------------------------

snmvaughan commented on code in PR #4725:
URL: https://github.com/apache/hadoop/pull/4725#discussion_r944566254


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/IPCLoggerChannel.java:
##########
@@ -599,7 +599,12 @@ public ListenableFuture<Long> getJournalCTime() {
 
   @Override
   public String toString() {
-    return InetAddresses.toAddrString(addr.getAddress()) + ':' + 
addr.getPort();
+    if (addr.isUnresolved()) {
+      return addr.getHostName() + ":" + addr.getPort();

Review Comment:
   This returns cached values.  This change is only introduced to allow string 
formatting to occur when the address is unresolved (instead of throwing an NPE).





> Unresolved Hosts during startup are not synced by JournalNodes
> --------------------------------------------------------------
>
>                 Key: HDFS-16688
>                 URL: https://issues.apache.org/jira/browse/HDFS-16688
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: journal-node
>         Environment: Running in Kubernetes using Java 11, with an HA 
> configuration.
>            Reporter: Steve Vaughan
>            Assignee: Steve Vaughan
>            Priority: Major
>              Labels: pull-request-available
>
> During the JournalNode startup, it builds the list of servers in the 
> JournalNode set, ignoring hostnames that cannot be resolved.  In environments 
> with dynamic IP address allocations this means that the JournalNodeSyncer 
> will never sync with hosts that aren't resolvable during startup.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to