public void closeAllQueries() {
    for (Query q : queries) {
      try {
        q.closeAll();
      } catch (Throwable t) {
        LOG.error("Failed to close a query", t);
      }
    }
  }
Base class to add the batch process for DirectSQL or RawStore queries.
 1. Provide the implementation of run() to process one batch
 2. Call Batchable.runBatched() to process the whole dataset

 I: input type, R: result type
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/Batchable.java