private void closeQuietly(AutoCloseable autoCloseable) {
    try {
      autoCloseable.close();
    } catch (Exception e) {
      LOG.warn("Error while closing resource.", e);
    }
  }
This class has similar functionality as {@link ThreadLocal}.
Plus it provides a close function to clean up resources in all threads where the resource was initialized.
@param <T> - type of resource, it must implement {@link AutoCloseable}
ql/src/java/org/apache/hadoop/hive/ql/util/CloseableThreadLocal.java