diff --git a/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java b/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java index 7a36b46..f469def 100644 --- a/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java +++ b/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java @@ -1384,6 +1384,10 @@ private int executeTestCommand(final String command) { commandArgs = commandArgs.replaceAll("\\$\\{hiveconf:hive\\.metastore\\.warehouse\\.dir\\}", wareHouseDir); + if (SessionState.get() != null) { + SessionState.get().setLastCommand(commandName + " " + commandArgs.trim()); + } + enableTestOnlyCmd(SessionState.get().getConf()); try { @@ -2196,7 +2200,7 @@ public boolean accept(File dir, String name) { public void failed(int ecode, String fname, String debugHint) { String command = SessionState.get() != null ? SessionState.get().getLastCommand() : null; String message = "Client execution failed with error code = " + ecode + - (command != null ? " running " + command : "") + "fname=" + fname + + (command != null ? " running \"" + command : "") + "\" fname=" + fname + " " + (debugHint != null ? debugHint : ""); LOG.error(message); Assert.fail(message);