public void stop()
      throws Exception {
    metricsReporters.forEach((reporterName, metricsReporter)  -> {
      log.info("Stopping the metrics reporter : {}.", reporterName);
      metricsReporter.stop();
    });
    log.info("Stopping server");
    server.stop();
    log.info("Server is stopped");
  }
Stops the server.

@throws Exception if the server could not be successfully stopped.
samza-rest/src/main/java/org/apache/samza/rest/SamzaRestService.java