Skip to content

Commit e94d65b

Browse files
committed
Add comments to explain the change
1 parent f650a9f commit e94d65b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobClient.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ public BlobClient(InetSocketAddress serverAddress, Configuration clientConfig)
9292
}
9393

9494
// Establish the socket using the hostname and port. This avoids a potential issue where
95-
// the
96-
// InetSocketAddress can cache a failure in hostname resolution forever.
95+
// the InetSocketAddress can cache a failure in hostname resolution forever.
96+
// Use getHostString() instead of getHostName() to avoid unnecessary reverse DNS and DNS
97+
// lookups when addresses are specified as IP literals. This improves reliability and
98+
// reduces latency for each blob transfer.
9799
socket.connect(
98100
new InetSocketAddress(serverAddress.getHostString(), serverAddress.getPort()),
99101
clientConfig.get(BlobServerOptions.CONNECT_TIMEOUT));

0 commit comments

Comments
 (0)