docs: protected void joinSchedulerDriver(long timeout, TimeUnit unit) {
      // ExecutorService used to monitor whether close() completes in time
      ExecutorService service = Executors.newFixedThreadPool(1);
      final CountDownLatch closeLatch = new CountDownLatch(1);
      Runnable driverJoin = new Runnable() {
        @Override
        public void run() {
          driver.join();
          closeLatch.countDown();
        }
      };
      service.submit(driverJoin);
  
      LOG.info("Waiting for Mesos Driver got stopped");
      try {
        if (!closeLatch.await(timeout, unit)) {
          LOG.severe("Mesos Driver failed to stop in time.");
        } else {
          LOG.info("Mesos Driver stopped.");
        }
      } catch (InterruptedException e) {
        LOG.log(Level.SEVERE, "Close latch thread is interrupted: ", e);
      }
  
      // Shutdown the ExecutorService
      service.shutdownNow();
    }