Zhankun Tang created YARN-9218:
----------------------------------

             Summary: When register to MockRM, MockNM spend 30s on 
InetAddress.getByName(name).getHostAddress();
                 Key: YARN-9218
                 URL: https://issues.apache.org/jira/browse/YARN-9218
             Project: Hadoop YARN
          Issue Type: Improvement
            Reporter: Zhankun Tang


In a test case, reproduce the issue with below code. And you'll see that this 
three code spends at least 30 seconds to complete.
{code:java}
MockRM rm1 = new MockRM(conf);
rm1.start();
rm1.registerNode("h1:1234", 2 * GB, 1);{code}
The root cause is when "registerNode". It will spend 30 seconds in below method 
which is invoked in RackResolver, NodeListManager.CachedResolver and 
NodeListManager.DirectResolver which is used to check a host when registering.
{code:java}
InetAddress.getByName(name).getHostAddress();{code}
We should mock the RackResolver.resolve(hostname) and resolver in 
NodeListManager to eliminate the wasting time.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-dev-h...@hadoop.apache.org

Reply via email to