aboutsummaryrefslogtreecommitdiff
path: root/examples/src/main
diff options
context:
space:
mode:
authorDaoyuan Wang <daoyuan.wang@intel.com>2014-10-17 14:49:44 -0700
committerJosh Rosen <joshrosen@apache.org>2014-10-17 14:49:44 -0700
commit23f6171d633d4347ca4aa8ec7cb7bd57342b21b5 (patch)
tree4821d941d56ac277ceea6b5f69bccf227dd98315 /examples/src/main
parentadcb7d3350032dda69a43de724c8bdff5fef2c67 (diff)
downloadspark-23f6171d633d4347ca4aa8ec7cb7bd57342b21b5.tar.gz
spark-23f6171d633d4347ca4aa8ec7cb7bd57342b21b5.tar.bz2
spark-23f6171d633d4347ca4aa8ec7cb7bd57342b21b5.zip
[SPARK-3985] [Examples] fix file path using os.path.join
Author: Daoyuan Wang <daoyuan.wang@intel.com> Closes #2834 from adrian-wang/sqlpypath and squashes the following commits: da7aa95 [Daoyuan Wang] fix file path using path.join
Diffstat (limited to 'examples/src/main')
-rw-r--r--examples/src/main/python/sql.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/src/main/python/sql.py b/examples/src/main/python/sql.py
index eefa022f19..d2c5ca48c6 100644
--- a/examples/src/main/python/sql.py
+++ b/examples/src/main/python/sql.py
@@ -48,7 +48,7 @@ if __name__ == "__main__":
# A JSON dataset is pointed to by path.
# The path can be either a single text file or a directory storing text files.
- path = os.environ['SPARK_HOME'] + "examples/src/main/resources/people.json"
+ path = os.path.join(os.environ['SPARK_HOME'], "examples/src/main/resources/people.json")
# Create a SchemaRDD from the file(s) pointed to by path
people = sqlContext.jsonFile(path)
# root