code: private void closeZooKeeper(@Nullable ZooKeeper zk) {
      try {
        if (zk != null) {
          zk.close();
        }
      } catch (InterruptedException e) {
        LOG.warn("Interrupted when closing ZooKeeper", e);
        Thread.currentThread().interrupt();
      }
    }
docs: Closes the given {@link ZooKeeper} if it is not null. If there is InterruptedException,
  it will get logged.