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.
--
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]