You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by na...@apache.org on 2010/01/06 22:43:43 UTC

svn commit: r896685 - in /hadoop/hive/trunk: CHANGES.txt ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java

Author: namit
Date: Wed Jan  6 21:43:36 2010
New Revision: 896685

URL: http://svn.apache.org/viewvc?rev=896685&view=rev
Log:
HIVE-1030 Hive should use scratchDir instead of system temporary directory
for storing plans (Zheng Shao via namit)


Modified:
    hadoop/hive/trunk/CHANGES.txt
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=896685&r1=896684&r2=896685&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Wed Jan  6 21:43:36 2010
@@ -406,6 +406,9 @@
 
     HIVE-458. Better error messages for fs.default.name. (Paul Yang via zshao)
 
+    HIVE-1030 Hive should use scratchDir instead of system temporary directory
+    for storing plans (Zheng Shao via namit)
+
 Release 0.4.0 -  Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java?rev=896685&r1=896684&r2=896685&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java Wed Jan  6 21:43:36 2010
@@ -76,10 +76,11 @@
 
       // Generate the hiveConfArgs after potentially adding the jars
       String hiveConfArgs = ExecDriver.generateCmdLine(conf);
+      File scratchDir = new File(conf.getVar(HiveConf.ConfVars.SCRATCHDIR));
       
       mapredWork plan = getWork();
 
-      File planFile = File.createTempFile("plan", ".xml");
+      File planFile = File.createTempFile("plan", ".xml", scratchDir);
       LOG.info("Generating plan file " + planFile.toString());
       FileOutputStream out = new FileOutputStream(planFile);
       Utilities.serializeMapRedWork(plan, out);