aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/context.py
diff options
context:
space:
mode:
authorMarcelo Vanzin <vanzin@cloudera.com>2015-01-21 14:38:14 -0800
committerJosh Rosen <joshrosen@databricks.com>2015-02-02 14:01:32 -0800
commit52f5754f45370f98e577a2aa96accf3ee2e2c8e2 (patch)
tree6ff69784fdbc8484f8f22614043583678dc7cbae /python/pyspark/context.py
parent2321dd1ef9b0ae70b686904fca4981549cc2d9b2 (diff)
downloadspark-52f5754f45370f98e577a2aa96accf3ee2e2c8e2.tar.gz
spark-52f5754f45370f98e577a2aa96accf3ee2e2c8e2.tar.bz2
spark-52f5754f45370f98e577a2aa96accf3ee2e2c8e2.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/pyspark/context.py')
-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 c0dec16ac1..bf1f61c850 100644
--- a/python/pyspark/context.py
+++ b/python/pyspark/context.py
@@ -192,7 +192,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
if self._conf.get("spark.python.profile", "false") == "true":