public Set<String> getAllQueryIds() {
    List<QueryInfo> queryInfos = new LinkedList<>();
    synchronized (webuiLock) {
      queryInfos.addAll(liveQueryInfos.values());
      if (historicalQueryInfos != null) {
        queryInfos.addAll(historicalQueryInfos.values());
      }
    }

    Set<String> results = new HashSet<>();
    for (QueryInfo queryInfo : queryInfos) {
      results.add(queryInfo.getQueryDisplay().getQueryId());
    }
    return results;
  }
@return displays representing a number of historical SQLOperations, at max number of
hive.server2.webui.max.historic.queries. Newest items will be first.
service/src/java/org/apache/hive/service/cli/operation/QueryInfoCache.java