Manoj Govindassamy created HUDI-2561:
----------------------------------------
Summary: Avoid using InetAddress.getLocalHost() when logging info
messages
Key: HUDI-2561
URL: https://issues.apache.org/jira/browse/HUDI-2561
Project: Apache Hudi
Issue Type: Task
Reporter: Manoj Govindassamy
Assignee: Manoj Govindassamy
InetAddress.getLocalHost() can take up as much as 30+seconds if the network
configurations are not done right. This might be due to local hostname IPv6
address missing in the /etc/hosts file or the network configs slowing down any
IPv6 name resolutions. If this API is used for logging verbose messages and
that too in the hot code path, it can lead order of magnitude slowness in the
overall task.
Sample test case showing this slowness:
TestCleaner#testBulkInsertAndCleanByVersions
Since we can't guarantee on the right network settings for local hostname in
all the setups, its better to avoid using InetAddress.getLocalHost() where all
is possible, especially when verbose logging status or debug details.
Here are the codes that are currently using InetAddress.getLocalHost():
# BitCaskDiskMap (this is in the hot code path)
# HoodieWithTimelineServer
--
This message was sent by Atlassian Jira
(v8.3.4#803005)