Collection<Driver> scanDrivers() throws IOException {
    final long start = System.nanoTime();

    ServiceLoader<Driver> sqlDrivers = ServiceLoader.load(Driver.class);

    Set<Driver> driverClasses = StreamSupport.stream(sqlDrivers.spliterator(), false).collect(Collectors.toSet());

    final long finish = System.nanoTime();

    info("Driver scan complete in " + TimeUnit.NANOSECONDS.toMillis(finish - start) + "ms");
    return Collections.unmodifiableSet(driverClasses);
  }
Output a progress indicator to the console.

@param cur
         the current progress
@param max
         the maximum progress, or -1 if unknown
beeline/src/java/org/apache/hive/beeline/BeeLine.java