public ArrayNode getQueryHistoryByUserId(String userId) {

    ArrayNode queryList = mapper.createArrayNode();

    if (StringUtils.isNotBlank(userId)) {

      // Fetch all queries from query log file
      ObjectNode queries = fetchAllQueriesFromFile();

      // Get user's query history list
      ObjectNode userQueries = (ObjectNode) queries.get(userId);

      if (userQueries != null) {
        Iterator<String> it = userQueries.fieldNames();
        while (it.hasNext()) {
          String key = it.next();
          ObjectNode queryItem = mapper.createObjectNode();
          queryItem.put("queryId", key);
          queryItem.put("queryText", userQueries.get(key).toString());
          queryItem.put("queryDateTime", simpleDateFormat.format(Long.valueOf(key)));
          queryList.add(queryItem);
        }
      }
    }

    return queryList;
  }
getQueryHistoryByUserId method reads and lists out the queries from history file

@param userId Logged in User's Id
geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/DataBrowser.java