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 <[email protected]>
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);