You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2013/09/29 19:15:01 UTC

svn commit: r1527350 - /hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java

Author: hashutosh
Date: Sun Sep 29 17:15:01 2013
New Revision: 1527350

URL: http://svn.apache.org/r1527350
Log:
HIVE-5178 : Wincompat : QTestUtil changes (Sushanth Sowmyan via Ashutosh Chauhan)

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

Modified: hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java?rev=1527350&r1=1527349&r2=1527350&view=diff
==============================================================================
--- hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java (original)
+++ hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java Sun Sep 29 17:15:01 2013
@@ -260,6 +260,11 @@ public class QTestUtil {
 
     String orgScratchDir = conf.getVar(HiveConf.ConfVars.SCRATCHDIR);
     conf.setVar(HiveConf.ConfVars.SCRATCHDIR, getHdfsUriString(orgScratchDir));
+
+    if (miniMr) {
+      String orgAuxJarFolder = conf.getAuxJars();
+      conf.setAuxJars(getHdfsUriString("file://" + orgAuxJarFolder));
+    }
   }
 
   private String getHdfsUriString(String uriStr) {
@@ -1068,6 +1073,10 @@ public class QTestUtil {
     in = new BufferedReader(new FileReader(fname));
     out = new BufferedWriter(new FileWriter(fname + ".orig"));
     while (null != (line = in.readLine())) {
+      // Ignore the empty lines on windows
+      if(line.isEmpty() && Shell.WINDOWS) {
+        continue;
+      }
       out.write(line);
       out.write('\n');
     }