[
https://issues.apache.org/jira/browse/HDFS-16688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17579007#comment-17579007
]
ASF GitHub Bot commented on HDFS-16688:
---------------------------------------
ndimiduk commented on code in PR #4725:
URL: https://github.com/apache/hadoop/pull/4725#discussion_r944558448
##########
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:
The call to `getHostName()` will force DNS resolution where previously this
was not previously forced here. Is this desirable? Problematic? Should be tied
to `dfs.namenode.edits.qjournals.resolution-required`?
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestGetConf.java:
##########
@@ -484,10 +483,10 @@ public void testGetJournalNodes() throws Exception {
conf.clear();
}
- /*
- ** Test for unknown journal node host exception.
+ /**
+ * Test handling of unresolvable journal node hosts. They are still
configured assuming that
+ * they will be resolvable in the future.
*/
- @Test(expected = UnknownHostException.class, timeout = 10000)
Review Comment:
Do you mean for this test method to no longer be executed?
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/IPCLoggerChannelMetrics.java:
##########
@@ -104,7 +104,12 @@ static IPCLoggerChannelMetrics create(IPCLoggerChannel ch)
{
private static String getName(IPCLoggerChannel ch) {
InetSocketAddress addr = ch.getRemoteAddress();
- String addrStr = addr.getAddress().getHostAddress();
+ String addrStr;
+ if (addr.isUnresolved()) {
+ addrStr = addr.getHostName();
Review Comment:
Same question here re: forcing DNS resolution.
> 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]