Skip to content

Commit

Permalink
Fix path relative to SPARK_HOME in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MLnick committed Jun 4, 2014
1 parent 1eaa08b commit eeb8205
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/pyspark/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ def test_oldhadoop(self):
ei = [(1, u'aa'), (1, u'aa'), (2, u'aa'), (2, u'bb'), (2, u'bb'), (3, u'cc')]
self.assertEqual(ints, ei)

hello = self.sc.hadoopFile("python/test_support/hello.txt",
hellopath = os.path.join(SPARK_HOME, "python/test_support/hello.txt")
hello = self.sc.hadoopFile(hellopath,
"org.apache.hadoop.mapred.TextInputFormat",
"org.apache.hadoop.io.LongWritable",
"org.apache.hadoop.io.Text").collect()
Expand All @@ -292,7 +293,8 @@ def test_newhadoop(self):
ei = [(1, u'aa'), (1, u'aa'), (2, u'aa'), (2, u'bb'), (2, u'bb'), (3, u'cc')]
self.assertEqual(ints, ei)

hello = self.sc.newAPIHadoopFile("python/test_support/hello.txt",
hellopath = os.path.join(SPARK_HOME, "python/test_support/hello.txt")
hello = self.sc.newAPIHadoopFile(hellopath,
"org.apache.hadoop.mapreduce.lib.input.TextInputFormat",
"org.apache.hadoop.io.LongWritable",
"org.apache.hadoop.io.Text").collect()
Expand Down

0 comments on commit eeb8205

Please sign in to comment.