You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by hi...@apache.org on 2015/09/05 01:10:18 UTC

tez git commit: TEZ-2768. Log a useful error message when the summary stream cannot be closed when shutting down an AM. (Jeff Zhang via hitesh)

Repository: tez
Updated Branches:
  refs/heads/master 1b30b17db -> e0523eb8c


TEZ-2768. Log a useful error message when the summary stream cannot be closed when shutting down an AM. (Jeff Zhang via hitesh)


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/e0523eb8
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/e0523eb8
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/e0523eb8

Branch: refs/heads/master
Commit: e0523eb8c515bc02a7d2ecff79d35c7bcd15971b
Parents: 1b30b17
Author: Hitesh Shah <hi...@apache.org>
Authored: Fri Sep 4 16:09:57 2015 -0700
Committer: Hitesh Shah <hi...@apache.org>
Committed: Fri Sep 4 16:09:57 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt                                         |  8 ++++++++
 .../tez/dag/history/recovery/RecoveryService.java   | 16 ++++++++++++++--
 2 files changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/e0523eb8/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 72b2c97..6bf961b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,8 @@ Release 0.8.1: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-2768. Log a useful error message when the summary stream cannot be closed when shutting
+  down an AM.
   TEZ-2745. ClassNotFoundException of user code should fail dag
   TEZ-2754. Tez UI: StartTime & EndTime is not displayed with right format in Graphical View
   TEZ-2752. logUnsuccessful completion in Attempt should write original finish
@@ -164,6 +166,8 @@ Release 0.7.1: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-2768. Log a useful error message when the summary stream cannot be closed when shutting
+  down an AM.
   TEZ-2745. ClassNotFoundException of user code should fail dag
   TEZ-2761. Tez UI: update the progress on the dag and vertices pages with info from AM
   TEZ-2731. Fix Tez GenericCounter performance bottleneck
@@ -404,6 +408,8 @@ Release 0.6.3: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-2768. Log a useful error message when the summary stream cannot be closed when shutting
+  down an AM.
   TEZ-2745. ClassNotFoundException of user code should fail dag
   TEZ-2752. logUnsuccessful completion in Attempt should write original finish
   time to ATS
@@ -621,6 +627,8 @@ INCOMPATIBLE CHANGES
   TEZ-2552. CRC errors can cause job to run for very long time in large jobs.
 
 ALL CHANGES:
+  TEZ-2768. Log a useful error message when the summary stream cannot be closed when shutting
+  down an AM.
   TEZ-2745. ClassNotFoundException of user code should fail dag
   TEZ-2752. logUnsuccessful completion in Attempt should write original finish
   time to ATS

http://git-wip-us.apache.org/repos/asf/tez/blob/e0523eb8/tez-dag/src/main/java/org/apache/tez/dag/history/recovery/RecoveryService.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/history/recovery/RecoveryService.java b/tez-dag/src/main/java/org/apache/tez/dag/history/recovery/RecoveryService.java
index 8a96c76..d870645 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/history/recovery/RecoveryService.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/history/recovery/RecoveryService.java
@@ -215,7 +215,12 @@ public class RecoveryService extends AbstractService {
           summaryStream.hflush();
           summaryStream.close();
         } catch (IOException ioe) {
-          LOG.warn("Error when closing summary stream", ioe);
+          if (!recoveryDirFS.exists(recoveryPath)) {
+            LOG.warn("Ignoring error while closing summary stream."
+                + " The recovery directory at {} has already been deleted externally", recoveryPath);
+          } else {
+            LOG.warn("Error when closing summary stream", ioe);
+          }
         }
       }
       for (Entry<TezDAGID, FSDataOutputStream> entry : outputStreamMap.entrySet()) {
@@ -224,7 +229,14 @@ public class RecoveryService extends AbstractService {
           entry.getValue().hflush();
           entry.getValue().close();
         } catch (IOException ioe) {
-          LOG.warn("Error when closing output stream", ioe);
+          if (!recoveryDirFS.exists(recoveryPath)) {
+            LOG.warn("Ignoring error while closing output stream."
+                + " The recovery directory at {} has already been deleted externally", recoveryPath);
+            // avoid closing other outputStream as the recovery directory has already been deleted.
+            break;
+          } else {
+            LOG.warn("Error when closing output stream", ioe);
+          }
         }
       }
     }