aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMarcelo Vanzin <vanzin@cloudera.com>2015-01-21 14:38:14 -0800
committerJosh Rosen <joshrosen@databricks.com>2015-01-21 14:38:14 -0800
commit079b3be81264b446f927739f26ed9f426611d83f (patch)
treead16ca85e879042aa5b07c24539d328349fddeeb /python
parentbb8bd11da51b3b4b59b921d9d2a550c78a865ee5 (diff)
downloadspark-079b3be81264b446f927739f26ed9f426611d83f.tar.gz
spark-079b3be81264b446f927739f26ed9f426611d83f.tar.bz2
spark-079b3be81264b446f927739f26ed9f426611d83f.zip
Make sure only owner can read / write to directories created for the job.
Whenever a directory is created by the utility method, immediately restrict its permissions so that only the owner has access to its contents. Signed-off-by: Josh Rosen <joshrosen@databricks.com>
Diffstat (limited to 'python')
-rw-r--r--python/pyspark/context.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/pyspark/context.py b/python/pyspark/context.py
index 3935413a34..b5c2421b88 100644
--- a/python/pyspark/context.py
+++ b/python/pyspark/context.py
@@ -189,7 +189,8 @@ class SparkContext(object):
# Create a temporary directory inside spark.local.dir:
local_dir = self._jvm.org.apache.spark.util.Utils.getLocalDir(self._jsc.sc().conf())
self._temp_dir = \
- self._jvm.org.apache.spark.util.Utils.createTempDir(local_dir).getAbsolutePath()
+ self._jvm.org.apache.spark.util.Utils.createTempDir(local_dir, "pyspark") \
+ .getAbsolutePath()
# profiling stats collected for each PythonRDD
self._profile_stats = []