ajothomas commented on code in PR #1605:
URL: https://github.com/apache/samza/pull/1605#discussion_r892950165
##########
samza-core/src/main/java/org/apache/samza/clustermanager/ClusterBasedJobCoordinator.java:
##########
@@ -233,6 +241,10 @@ public ClusterBasedJobCoordinator(MetricsRegistryMap
metrics, MetadataStore meta
new ApplicationConfig(config));
this.containerPlacementRequestAllocatorThread =
new Thread(containerPlacementRequestAllocator, "Samza-" +
ContainerPlacementRequestAllocator.class.getSimpleName());
+
+ // build DrainMonitor
+ this.drainMonitor = new DrainMonitor(metadataStore, config);
Review Comment:
Done.
##########
samza-core/src/main/java/org/apache/samza/clustermanager/ClusterBasedJobCoordinator.java:
##########
@@ -399,6 +415,18 @@ private void onShutDown() {
}
}
+ private void stopDrainMonitorAndCleanup() {
+ // Stop the Drain Monitor.
+ // Also, garbage collect all DrainNotifications from Drain metadata-store
of the job if the following conditions
+ // are met:
+ // 1) Job is already draining
+ // 2) All containers shutdown successfully (due to drain)
+ // 3) There was no exception in the coordinator
+ drainMonitor.stop(drainMonitor.isDraining()
Review Comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]