Skip to content

Commit 0c5c53b

Browse files
authored
fix can not find /tmp/xxx/yyy.tar.gz (#3111)
when spark use cluster deploy-mode, the run_path will be created on the submitting host instead of the host where the driver is located
1 parent ef9dd77 commit 0c5c53b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

luigi/contrib/spark.py

+1
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ def _setup_packages(self, sc):
356356
mod_path = mod.__path__[0]
357357
except AttributeError:
358358
mod_path = mod.__file__
359+
os.makedirs(self.run_path, exist_ok=True)
359360
tar_path = os.path.join(self.run_path, package + '.tar.gz')
360361
tar = tarfile.open(tar_path, "w:gz")
361362
tar.add(mod_path, os.path.basename(mod_path))

0 commit comments

Comments
 (0)