Skip to content

Commit

Permalink
change number of partitions during tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davies committed Sep 30, 2014
1 parent b98d63f commit 9a16bd1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/pyspark/streaming/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import unittest
import tempfile

from pyspark.context import SparkContext, RDD
from pyspark.context import SparkConf, SparkContext, RDD
from pyspark.streaming.context import StreamingContext


Expand All @@ -33,7 +33,8 @@ class PySparkStreamingTestCase(unittest.TestCase):

def setUp(self):
class_name = self.__class__.__name__
self.sc = SparkContext(appName=class_name)
conf = SparkConf().set("spark.default.parallelism", 1)
self.sc = SparkContext(appName=class_name, conf=conf)
self.sc.setCheckpointDir("/tmp")
# TODO: decrease duration to speed up tests
self.ssc = StreamingContext(self.sc, self.duration)
Expand Down

0 comments on commit 9a16bd1

Please sign in to comment.