add a flag to indicate the start of cluster manager
Metrics in GobblinClusterManager are initialized after the GobblinClusterManager starts, so added a flag in GobblinClusterManager to indicate the start, otherwise downstream applications may use uninitialized metrics.
@@ -135,6 +135,8 @@ public class GobblinClusterManager implements ApplicationLauncher, StandardMetri
private GobblinHelixJobScheduler jobScheduler;
@Getter
private JobConfigurationManager jobConfigurationManager;
+ @Getter
+ private volatile boolean started = false;
protected final String clusterName;
@Getter
@@ -317,6 +319,7 @@ public class GobblinClusterManager implements ApplicationLauncher, StandardMetri
} else {
startAppLauncherAndServices();
}
+ this.started = true;
}
/**
