code: @Override
    public void close() throws IOException {
      try {
        for (Map.Entry<String, Future<Void>> entry : this.futures.entrySet()) {
          try {
            entry.getValue().get();
          } catch (ExecutionException ee) {
            throw new IOException("Failed to finish registration for " + entry.getKey(), ee.getCause());
          }
        }
      } catch (InterruptedException e) {
        throw new IOException(e);
      } finally {
        ExecutorsUtils.shutdownExecutorService(this.executor, Optional.of(log));
      }
    }
docs: Wait till all registration requested submitted via {@link #register(HiveSpec)} to finish.
  
  @throws IOException if any registration failed or was interrupted.