private void cleanupDrainNotifications() {
    if (containerProcessManager.isShutdownSuccessful() && coordinatorRunException == null) {
      // Garbage collect all DrainNotifications from Drain metadata-store of the job if the following conditions
      // are met:
      // 1) If the job is draining
      // 2) All containers shutdown successfully due to drain
      // 3) There was no exception in the coordinator
      DrainUtils.cleanup(metadataStore, config);
    }
  }
Stops all components of the JobCoordinator.
samza-core/src/main/java/org/apache/samza/clustermanager/ClusterBasedJobCoordinator.java