You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by bh...@apache.org on 2019/12/20 22:35:16 UTC
[samza] branch master updated: SAMZA-2423: Heartbeat failure causes
incorrect container shutdown (#1240)
This is an automated email from the ASF dual-hosted git repository.
bharathkk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/samza.git
The following commit(s) were added to refs/heads/master by this push:
new 08ee3a3 SAMZA-2423: Heartbeat failure causes incorrect container shutdown (#1240)
08ee3a3 is described below
commit 08ee3a338bbebcf3715b7f48dcfd61ecc5ab69ae
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);