public void failedWithException(Exception e, String fname, String debugHint) {
    String command = SessionState.get() != null ? SessionState.get().getLastCommand() : null;
    System.err.println("Failed query: " + fname);
    System.err.flush();
    Assert.fail("Unexpected exception " + org.apache.hadoop.util.StringUtils.stringifyException(e) + "\n" + (command
        != null ? " running " + command : "") + (debugHint != null ? debugHint : ""));
  }
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