[
https://issues.apache.org/jira/browse/HDFS-16684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17581996#comment-17581996
]
ASF GitHub Bot commented on HDFS-16684:
---------------------------------------
snmvaughan commented on code in PR #4723:
URL: https://github.com/apache/hadoop/pull/4723#discussion_r950496002
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNodeSyncer.java:
##########
@@ -310,12 +314,23 @@ private List<InetSocketAddress>
getOtherJournalNodeAddrs() {
return null;
}
- private List<InetSocketAddress> getJournalAddrList(String uriStr) throws
+ @VisibleForTesting
+ protected List<InetSocketAddress> getJournalAddrList(String uriStr) throws
URISyntaxException,
IOException {
URI uri = new URI(uriStr);
- return Util.getLoggerAddresses(uri,
- new HashSet<>(Arrays.asList(jn.getBoundIpcAddress())), conf);
+
+ InetSocketAddress boundIpcAddress = jn.getBoundIpcAddress();
+ Set<InetSocketAddress> excluded = Sets.newHashSet(boundIpcAddress);
+ List<InetSocketAddress> addrList = Util.getLoggerAddresses(uri, excluded,
conf);
+
+ // Exclude the current JournalNode instance. If we are bound to a local
address on the same
Review Comment:
We can't exclude any port since we might be running with multiple nodes on
the same host. The goal is simply to exclude the local instance while still
synchronizing with other instances.
> Exclude self from JournalNodeSyncer when using a bind host
> ----------------------------------------------------------
>
> Key: HDFS-16684
> URL: https://issues.apache.org/jira/browse/HDFS-16684
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: journal-node
> Environment: Running with Java 11 and bind addresses set to 0.0.0.0.
> Reporter: Steve Vaughan
> Assignee: Steve Vaughan
> Priority: Major
> Labels: pull-request-available
>
> The JournalNodeSyncer will include the local instance in syncing when using a
> bind host (e.g. 0.0.0.0). There is a mechanism that is supposed to exclude
> the local instance, but it doesn't recognize the meta-address as a local
> address.
> Running with bind addresses set to 0.0.0.0, the JournalNodeSyncer will log
> attempts to sync with itself as part of the normal syncing rotation. For an
> HA configuration running 3 JournalNodes, the "other" list used by the
> JournalNodeSyncer will include 3 proxies.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]