This is an automated email from the ASF dual-hosted git repository.

abstractdog pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tez.git


The following commit(s) were added to refs/heads/master by this push:
     new ba441c1  TEZ-4097: Report localHostname in Fetcher and 
FetcherOrderedGrouped failure log messages (László Bodor reviewed by Ashutosh 
Chauhan)
ba441c1 is described below

commit ba441c1ca9dac51e20ba8561ed3c4b7b620d9505
Author: László Bodor <[email protected]>
AuthorDate: Sun Mar 1 16:27:04 2020 +0100

    TEZ-4097: Report localHostname in Fetcher and FetcherOrderedGrouped failure 
log messages (László Bodor reviewed by Ashutosh Chauhan)
    
    Signed-off-by: Laszlo Bodor <[email protected]>
---
 .../apache/tez/runtime/library/common/shuffle/Fetcher.java   | 11 ++++++-----
 .../common/shuffle/orderedgrouped/FetcherOrderedGrouped.java | 12 ++++++------
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git 
a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/Fetcher.java
 
b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/Fetcher.java
index fa883e4..5da12de 100644
--- 
a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/Fetcher.java
+++ 
b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/Fetcher.java
@@ -542,8 +542,9 @@ public class Fetcher extends CallableWithNdc<FetchResult> {
         }
       } else {
         InputAttemptIdentifier firstAttempt = attempts.iterator().next();
-        LOG.warn("Fetch Failure from host while connecting: " + host + ", 
attempt: " + firstAttempt
-            + " Informing ShuffleManager: ", e);
+        LOG.warn(String.format(
+            "Fetch Failure while connecting from %s to: %s:%d, attempt: %s 
Informing ShuffleManager: ",
+            localHostname, host, port, firstAttempt), e);
         return new HostFetchResult(new FetchResult(host, port, partition, 
partitionCount, srcAttemptsRemaining.values()),
             new InputAttemptIdentifier[] { firstAttempt }, false);
       }
@@ -1008,8 +1009,8 @@ public class Fetcher extends CallableWithNdc<FetchResult> 
{
           return new InputAttemptIdentifier[] { srcAttemptId };
         }
       }
-      LOG.warn("Failed to shuffle output of " + srcAttemptId + " from " + host,
-          ioe);
+      LOG.warn("Failed to shuffle output of " + srcAttemptId + " from " + host 
+ " (to "
+          + localHostname + ")", ioe);
 
       // Cleanup the fetchedInput
       cleanupFetchedInput(fetchedInput);
@@ -1049,7 +1050,7 @@ public class Fetcher extends CallableWithNdc<FetchResult> 
{
 
     if (currentTime - retryStartTime < httpConnectionParams.getReadTimeout()) {
       LOG.warn("Shuffle output from " + srcAttemptId +
-          " failed, retry it.");
+          " failed (to "+ localHostname +"), retry it.");
       //retry connecting to the host
       return true;
     } else {
diff --git 
a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/orderedgrouped/FetcherOrderedGrouped.java
 
b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/orderedgrouped/FetcherOrderedGrouped.java
index af9b929..cb8e751 100644
--- 
a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/orderedgrouped/FetcherOrderedGrouped.java
+++ 
b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/orderedgrouped/FetcherOrderedGrouped.java
@@ -67,7 +67,6 @@ class FetcherOrderedGrouped extends CallableWithNdc<Void> {
   private final TezCounter ioErrs;
   private final TezCounter wrongLengthErrs;
   private final TezCounter badIdErrs;
-  private final TezCounter wrongMapErrs;
   private final TezCounter wrongReduceErrs;
   private final FetchedInputAllocatorOrderedGrouped allocator;
   private final ShuffleScheduler scheduler;
@@ -77,7 +76,7 @@ class FetcherOrderedGrouped extends CallableWithNdc<Void> {
   private final String localShuffleHost;
   private final int localShufflePort;
   private final String applicationId;
- private final int dagId;
+  private final int dagId;
   private final MapHost mapHost;
 
   private final int minPartition;
@@ -143,7 +142,6 @@ class FetcherOrderedGrouped extends CallableWithNdc<Void> {
     this.ioErrs = ioErrsCounter;
     this.wrongLengthErrs = wrongLengthErrsCounter;
     this.badIdErrs = badIdErrsCounter;
-    this.wrongMapErrs = wrongMapErrsCounter;
     this.connectionErrs = connectionErrsCounter;
     this.wrongReduceErrs = wrongReduceErrsCounter;
     this.applicationId = applicationId;
@@ -363,11 +361,13 @@ class FetcherOrderedGrouped extends CallableWithNdc<Void> 
{
       }
       ioErrs.increment(1);
       if (!connectSucceeded) {
-        LOG.warn("Failed to connect to " + host + " with " + remaining.size() 
+ " inputs", ie);
+        LOG.warn(String.format("Failed to connect from %s to %s with %d 
inputs", localShuffleHost,
+            host, remaining.size()), ie);
         connectionErrs.increment(1);
       } else {
-        LOG.warn("Failed to verify reply after connecting to " + host + " with 
" + remaining.size()
-            + " inputs pending", ie);
+        LOG.warn(String.format(
+            "Failed to verify reply after connecting from %s to %s with %d 
inputs pending",
+            localShuffleHost, host, remaining.size()), ie);
       }
 
       // At this point, either the connection failed, or the initial header 
verification failed.

Reply via email to