private void handleLogOnQueryCompletion(String queryIdString, String dagIdString) {
    if (routeBasedLoggingEnabled) {
      // Inform the routing purgePolicy.
      // Send out a fake log message at the ERROR level with the MDC for this query setup. With an
      // LLAP custom appender this message will not be logged.
      MDC.put("dagId", dagIdString);
      MDC.put("queryId", queryIdString);
      try {
        LOG.error(QUERY_COMPLETE_MARKER, "Ignore this. Log line to interact with logger." +
            " Query complete: " + queryIdString + ", " +
            dagIdString);
      } finally {
        MDC.clear();
      }
    }
  }
Register completion for a query
@param queryIdentifier
@param deleteDelay
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/QueryTracker.java