public void failedQuery(Throwable e, int ecode, String fname, String debugHint) {
    String command = SessionState.get() != null ? SessionState.get().getLastCommand() : null;

    String message = String.format(
        "Client execution failed with error code = %d %nrunning %s %nfname=%s%n%s%n %s", ecode,
        command != null ? command : "", fname, debugHint != null ? debugHint : "",
        e == null ? "" : org.apache.hadoop.util.StringUtils.stringifyException(e));
    LOG.error(message);
    Assert.fail(message);
  }
Given the current configurations (e.g., hadoop version and execution mode), return
the correct file name to compare with the current test run output.

@param outDir   The directory where the reference log files are stored.
@param testName The test file name (terminated by ".out").
@return The file name appended with the configuration values if it exists.
itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java