You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jv...@apache.org on 2010/07/27 09:19:40 UTC

svn commit: r979562 - in /hadoop/hive/trunk: CHANGES.txt ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java

Author: jvs
Date: Tue Jul 27 07:19:40 2010
New Revision: 979562

URL: http://svn.apache.org/viewvc?rev=979562&view=rev
Log:
HIVE-1489. TestCliDriver -Doverwrite=true does not put the file in
the correct directory
(Ning Zhang via jvs)


Modified:
    hadoop/hive/trunk/CHANGES.txt
    hadoop/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=979562&r1=979561&r2=979562&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Tue Jul 27 07:19:40 2010
@@ -86,6 +86,10 @@ Trunk -  Unreleased
     causing build failure
     (Joydeep Sen Sarma via Ning Zhang)
 
+    HIVE-1489. TestCliDriver -Doverwrite=true does not put the file in
+    the correct directory
+    (Ning Zhang via jvs)
+
 Release 0.6.0 -  Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java?rev=979562&r1=979561&r2=979562&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java (original)
+++ hadoop/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java Tue Jul 27 07:19:40 2010
@@ -304,8 +304,9 @@ public class QTestUtil {
   public void clearTestSideEffects () throws Exception {
     // delete any tables other than the source tables
     for (String s: db.getAllTables()) {
-      if (!srcTables.contains(s))
+      if (!srcTables.contains(s)) {
         db.dropTable(MetaStoreUtils.DEFAULT_DATABASE_NAME, s);
+      }
     }
     // allocate and initialize a new conf since a test can
     // modify conf by using 'set' commands
@@ -827,7 +828,7 @@ public class QTestUtil {
    * @return The file name appended with the configuration values if it exists.
    */
   public String outPath(String outDir, String testName) {
-    String ret = testName;
+    String ret = (new File(outDir, testName)).getPath();
     // List of configurations. Currently the list consists of hadoop version and execution mode only
     List<String> configs = new ArrayList<String>();
     configs.add(this.hadoopVer);