diff --git a/ant/src/org/apache/hadoop/hive/ant/QTestGenTask.java b/ant/src/org/apache/hadoop/hive/ant/QTestGenTask.java index 588e4bf..4c454c9 100644 --- a/ant/src/org/apache/hadoop/hive/ant/QTestGenTask.java +++ b/ant/src/org/apache/hadoop/hive/ant/QTestGenTask.java @@ -452,9 +452,6 @@ public void execute() throws BuildException { if (hadoopVersion == null) { hadoopVersion = ""; } - if (hiveConfDir == null) { - hiveConfDir = ""; - } // For each of the qFiles generate the test VelocityContext ctx = new VelocityContext(); @@ -468,7 +465,11 @@ public void execute() throws BuildException { } ctx.put("logDir", relativePath(hiveRootDir, logDir)); ctx.put("clusterMode", clusterMode); - ctx.put("hiveConfDir", escapePath(hiveConfDir)); + if (hiveConfDir == null || hiveConfDir.isEmpty()) { + ctx.put("hiveConfDir", ""); + } else { + ctx.put("hiveConfDir", relativePath(hiveRootDir, new File(hiveConfDir))); + } ctx.put("hadoopVersion", hadoopVersion); ctx.put("initScript", initScript); ctx.put("cleanupScript", cleanupScript);