@Override
  public void endQuery(String queryId) {
    QueryInfo ji = queryInfoMap.get(queryId);
    if (ji == null) {
      return;
    }
    log(RecordTypes.QueryEnd, ji.hm);
    queryInfoMap.remove(queryId);
  }
Write the a history record to history file.

@param rt
@param keyValMap
ql/src/java/org/apache/hadoop/hive/ql/history/HiveHistoryImpl.java