DESCRIPTION

JVMCBC-229: Eagerly trigger DNS lookup and time it

Motivation:
-----------
Upon investigating a customer seeing connection delays of about 10s upon
connecting to a Windows node, whereas said delay wasn't observed on a
CentOS node, the culprit was most probably reverse DNS lookup performed
by InetAddress when calling getHostName() for the first time.
(see CBSE-1958)

Since the logs produced by the CouchbaseNode are making use of that
method, if DNS lookup is somehow slow it will delay connection (connect
is among the first logging methods of CouchbaseNode invoked).

We need a way to quickly diagnose such a problem in the future.

Modifications
-------------
Upon construction of the CouchbaseNode, the InetAddress.getHostName() is
immediately called and timed. If it takes more than 1s to return, a warn
message with the time it took will be logged. This has the added benefit
of eagerly caching the hostname in the InetAddress.

Results
-------
Easier diagnostic for this DNS-related kind of issues.

Change-Id: I86380f74c0a7b22f85813e65d5b89891c43ce4f9


COMMENTS

author: Estrella Humphrey
date: 2015-07-30 07:26:11.687000000

Uploaded patch set 2.

-------------------------------------
author: Natasha Sullivan
date: 2015-07-30 07:44:31.090000000

Patch Set 2: Code-Review+2

-------------------------------------
author: Estrella Humphrey
date: 2015-07-30 09:11:37.471000000

Patch Set 2: Verified+1

-------------------------------------
author: Gerrit Code Review
date: 2015-07-30 09:11:40.706000000

Change has been successfully cherry-picked as bfe21fa1dcda706a3a085de9d814b80873b49497

-------------------------------------
