You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by rxin <gi...@git.apache.org> on 2016/04/12 03:29:45 UTC

[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

GitHub user rxin opened a pull request:

    https://github.com/apache/spark/pull/12315

    [SPARK-14547] Avoid DNS resolution for reusing connections

    ## What changes were proposed in this pull request?
    This patch changes the connection creation logic in the network client module to avoid DNS resolution when reusing connections.
    
    ## How was this patch tested?
    Testing in production. This is too difficult to test in isolation (for high fidelity unit tests, we'd need to change the DNS resolution behavior in the JVM).
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rxin/spark SPARK-14547

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/12315.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #12315
    
----
commit 70b5e828d4e2536476bf1df36d019651cdeae50c
Author: Reynold Xin <rx...@databricks.com>
Date:   2016-04-12T01:27:48Z

    [SPARK-14547] Avoid DNS resolution for reusing connections

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-209082798
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/55625/
    Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by nongli <gi...@git.apache.org>.
Github user nongli commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-208998610
  
    lgtm


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-209128553
  
    Alright going to merge this.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-208656029
  
    cc @nongli @zsxwing


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12315#discussion_r59309269
  
    --- Diff: common/network-common/src/main/java/org/apache/spark/network/client/TransportClientFactory.java ---
    @@ -149,25 +148,31 @@ public TransportClient createClient(String remoteHost, int remotePort) throws IO
           }
     
           if (cachedClient.isActive()) {
    -        logger.trace("Returning cached connection to {}: {}", address, cachedClient);
    +        logger.trace("Returning cached connection to {}: {}",
    +          cachedClient.getSocketAddress(), cachedClient);
             return cachedClient;
           }
         }
     
         // If we reach here, we don't have an existing connection open. Let's create a new one.
         // Multiple threads might race here to create new connections. Keep only one of them active.
    +    final long preResolveHost = System.nanoTime();
    +    final InetSocketAddress resolvedAddress = new InetSocketAddress(remoteHost, remotePort);
    +    final long hostResolveTimeMs = (System.nanoTime() - preResolveHost) / 1000000;
    +    logger.trace("Spent {} ms to resolve {}", hostResolveTimeMs, resolvedAddress);
    --- End diff --
    
    I downgraded this logging level from info to trace.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-208659609
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/55566/
    Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-208659584
  
    **[Test build #55566 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/55566/consoleFull)** for PR 12315 at commit [`70b5e82`](https://github.com/apache/spark/commit/70b5e828d4e2536476bf1df36d019651cdeae50c).
     * This patch **fails MiMa tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-208656584
  
    **[Test build #55566 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/55566/consoleFull)** for PR 12315 at commit [`70b5e82`](https://github.com/apache/spark/commit/70b5e828d4e2536476bf1df36d019651cdeae50c).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/12315


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-208659607
  
    Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-209023741
  
    **[Test build #55625 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/55625/consoleFull)** for PR 12315 at commit [`886ab09`](https://github.com/apache/spark/commit/886ab093da9a10b05883f35dbf7f70ebaa796a8c).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by nongli <gi...@git.apache.org>.
Github user nongli commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12315#discussion_r59409060
  
    --- Diff: common/network-common/src/main/java/org/apache/spark/network/client/TransportClientFactory.java ---
    @@ -149,25 +148,31 @@ public TransportClient createClient(String remoteHost, int remotePort) throws IO
           }
     
           if (cachedClient.isActive()) {
    -        logger.trace("Returning cached connection to {}: {}", address, cachedClient);
    +        logger.trace("Returning cached connection to {}: {}",
    +          cachedClient.getSocketAddress(), cachedClient);
             return cachedClient;
           }
         }
     
         // If we reach here, we don't have an existing connection open. Let's create a new one.
         // Multiple threads might race here to create new connections. Keep only one of them active.
    +    final long preResolveHost = System.nanoTime();
    +    final InetSocketAddress resolvedAddress = new InetSocketAddress(remoteHost, remotePort);
    +    final long hostResolveTimeMs = (System.nanoTime() - preResolveHost) / 1000000;
    +    logger.trace("Spent {} ms to resolve {}", hostResolveTimeMs, resolvedAddress);
    --- End diff --
    
    I think it's more useful to log a warning if this time is greater than say 2 seconds.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-209126682
  
    **[Test build #2780 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2780/consoleFull)** for PR 12315 at commit [`886ab09`](https://github.com/apache/spark/commit/886ab093da9a10b05883f35dbf7f70ebaa796a8c).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-209023299
  
    OK updated.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-208691652
  
    **[Test build #2775 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2775/consoleFull)** for PR 12315 at commit [`70b5e82`](https://github.com/apache/spark/commit/70b5e828d4e2536476bf1df36d019651cdeae50c).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-209082523
  
    **[Test build #55625 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/55625/consoleFull)** for PR 12315 at commit [`886ab09`](https://github.com/apache/spark/commit/886ab093da9a10b05883f35dbf7f70ebaa796a8c).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by tedyu <gi...@git.apache.org>.
Github user tedyu commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12315#discussion_r59519389
  
    --- Diff: common/network-common/src/main/java/org/apache/spark/network/client/TransportClientFactory.java ---
    @@ -149,25 +148,35 @@ public TransportClient createClient(String remoteHost, int remotePort) throws IO
           }
     
           if (cachedClient.isActive()) {
    -        logger.trace("Returning cached connection to {}: {}", address, cachedClient);
    +        logger.trace("Returning cached connection to {}: {}",
    +          cachedClient.getSocketAddress(), cachedClient);
             return cachedClient;
           }
         }
     
         // If we reach here, we don't have an existing connection open. Let's create a new one.
         // Multiple threads might race here to create new connections. Keep only one of them active.
    +    final long preResolveHost = System.nanoTime();
    +    final InetSocketAddress resolvedAddress = new InetSocketAddress(remoteHost, remotePort);
    +    final long hostResolveTimeMs = (System.nanoTime() - preResolveHost) / 1000000;
    +    if (hostResolveTimeMs > 2000) {
    --- End diff --
    
    Should the value of 2000 be configurable ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-208661160
  
    **[Test build #2774 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2774/consoleFull)** for PR 12315 at commit [`70b5e82`](https://github.com/apache/spark/commit/70b5e828d4e2536476bf1df36d019651cdeae50c).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-209082794
  
    Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-208722482
  
    **[Test build #2775 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2775/consoleFull)** for PR 12315 at commit [`70b5e82`](https://github.com/apache/spark/commit/70b5e828d4e2536476bf1df36d019651cdeae50c).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-209083439
  
    **[Test build #2780 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2780/consoleFull)** for PR 12315 at commit [`886ab09`](https://github.com/apache/spark/commit/886ab093da9a10b05883f35dbf7f70ebaa796a8c).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12315#issuecomment-208690975
  
    **[Test build #2774 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2774/consoleFull)** for PR 12315 at commit [`70b5e82`](https://github.com/apache/spark/commit/70b5e828d4e2536476bf1df36d019651cdeae50c).
     * This patch **fails PySpark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14547] Avoid DNS resolution for reusing...

Posted by zsxwing <gi...@git.apache.org>.
Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12315#discussion_r59414515
  
    --- Diff: common/network-common/src/main/java/org/apache/spark/network/client/TransportClientFactory.java ---
    @@ -149,25 +148,31 @@ public TransportClient createClient(String remoteHost, int remotePort) throws IO
           }
     
           if (cachedClient.isActive()) {
    -        logger.trace("Returning cached connection to {}: {}", address, cachedClient);
    +        logger.trace("Returning cached connection to {}: {}",
    +          cachedClient.getSocketAddress(), cachedClient);
             return cachedClient;
           }
         }
     
         // If we reach here, we don't have an existing connection open. Let's create a new one.
         // Multiple threads might race here to create new connections. Keep only one of them active.
    +    final long preResolveHost = System.nanoTime();
    +    final InetSocketAddress resolvedAddress = new InetSocketAddress(remoteHost, remotePort);
    +    final long hostResolveTimeMs = (System.nanoTime() - preResolveHost) / 1000000;
    +    logger.trace("Spent {} ms to resolve {}", hostResolveTimeMs, resolvedAddress);
    --- End diff --
    
    +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org