You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by lh...@apache.org on 2020/02/06 23:26:55 UTC

[samza] branch 1.3.1 updated: SAMZA-2423: Heartbeat failure causes incorrect container shutdown (#1240)

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

lhaiesp pushed a commit to branch 1.3.1
in repository https://gitbox.apache.org/repos/asf/samza.git


The following commit(s) were added to refs/heads/1.3.1 by this push:
     new a02c8c4  SAMZA-2423: Heartbeat failure causes incorrect container shutdown (#1240)
a02c8c4 is described below

commit a02c8c48bfbd79581e4a6ff178008a42392f0e27
Author: Abhishek Shivanna <as...@linkedin.com>
AuthorDate: Fri Dec 20 14:35:07 2019 -0800

    SAMZA-2423: Heartbeat failure causes incorrect container shutdown (#1240)
    
    Populate container exception from the listener only if it is null
---
 .../main/java/org/apache/samza/runtime/ContainerLaunchUtil.java    | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/samza-core/src/main/java/org/apache/samza/runtime/ContainerLaunchUtil.java b/samza-core/src/main/java/org/apache/samza/runtime/ContainerLaunchUtil.java
index 47f7398..54cb298 100644
--- a/samza-core/src/main/java/org/apache/samza/runtime/ContainerLaunchUtil.java
+++ b/samza-core/src/main/java/org/apache/samza/runtime/ContainerLaunchUtil.java
@@ -142,7 +142,12 @@ public class ContainerLaunchUtil {
         heartbeatMonitor.stop();
       }
 
-      containerRunnerException = listener.getContainerException();
+      // Check to see if the HeartbeatMonitor has set an exception before
+      // overriding the value with what the listener returns
+      if (containerRunnerException == null) {
+        containerRunnerException = listener.getContainerException();
+      }
+
       if (containerRunnerException != null) {
         log.error("Container stopped with Exception. Exiting process now.", containerRunnerException);
         System.exit(1);