pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z..@apache.org
Subject svn commit: r1786958 - /pig/branches/spark/src/org/apache/pig/backend/hadoop/executionengine/spark/SparkLauncher.java
Date Tue, 14 Mar 2017 22:06:48 GMT
Author: zly
Date: Tue Mar 14 22:06:48 2017
New Revision: 1786958

URL: http://svn.apache.org/viewvc?rev=1786958&view=rev
Log:
PIG-5181:JobManagement_3 is failing with spark exec type (Nandor via Liyun)

Modified:
    pig/branches/spark/src/org/apache/pig/backend/hadoop/executionengine/spark/SparkLauncher.java

Modified: pig/branches/spark/src/org/apache/pig/backend/hadoop/executionengine/spark/SparkLauncher.java
URL: http://svn.apache.org/viewvc/pig/branches/spark/src/org/apache/pig/backend/hadoop/executionengine/spark/SparkLauncher.java?rev=1786958&r1=1786957&r2=1786958&view=diff
==============================================================================
--- pig/branches/spark/src/org/apache/pig/backend/hadoop/executionengine/spark/SparkLauncher.java
(original)
+++ pig/branches/spark/src/org/apache/pig/backend/hadoop/executionengine/spark/SparkLauncher.java
Tue Mar 14 22:06:48 2017
@@ -377,10 +377,12 @@ public class SparkLauncher extends Launc
 
     private void cacheFiles(String cacheFiles) throws IOException {
         if (cacheFiles != null) {
+            File tmpFolder = Files.createTempDirectory("cache").toFile();
+            tmpFolder.deleteOnExit();
             for (String file : cacheFiles.split(",")) {
                 String fileName = extractFileName(file.trim());
                 Path src = new Path(extractFileUrl(file.trim()));
-                File tmpFile = File.createTempFile(fileName, ".tmp");
+                File tmpFile = new File(tmpFolder, fileName);
                 Path tmpFilePath = new Path(tmpFile.getAbsolutePath());
                 FileSystem fs = tmpFilePath.getFileSystem(jobConf);
                 fs.copyToLocalFile(src, tmpFilePath);



Mime
View raw message