abhishekmjain commented on code in PR #4173:
URL: https://github.com/apache/gobblin/pull/4173#discussion_r2915734656
##########
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinTaskRunner.java:
##########
@@ -415,22 +420,42 @@ public synchronized void stop() {
logger.info("Stopping the Gobblin Task runner");
- // Stop metric reporting
- if (this.containerMetrics.isPresent()) {
- this.containerMetrics.get().stopMetricsReporting();
- }
-
try {
stopServices();
} finally {
logger.info("All services are stopped.");
- this.taskStateModelFactory.shutdown();
+ shutdownTaskStateModelFactory();
disconnectHelixManager();
}
+ // Stop metric reporting only after tasks have completed and emitted their
final GTEs
+ if (this.containerMetrics.isPresent()) {
+ this.containerMetrics.get().stopMetricsReporting();
+ }
+
this.isStopped = true;
}
+ void shutdownTaskStateModelFactory() {
Review Comment:
nit: this can be private
--
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]