We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b98d63f commit 9a16bd1Copy full SHA for 9a16bd1
python/pyspark/streaming/tests.py
@@ -22,7 +22,7 @@
22
import unittest
23
import tempfile
24
25
-from pyspark.context import SparkContext, RDD
+from pyspark.context import SparkConf, SparkContext, RDD
26
from pyspark.streaming.context import StreamingContext
27
28
@@ -33,7 +33,8 @@ class PySparkStreamingTestCase(unittest.TestCase):
33
34
def setUp(self):
35
class_name = self.__class__.__name__
36
- self.sc = SparkContext(appName=class_name)
+ conf = SparkConf().set("spark.default.parallelism", 1)
37
+ self.sc = SparkContext(appName=class_name, conf=conf)
38
self.sc.setCheckpointDir("/tmp")
39
# TODO: decrease duration to speed up tests
40
self.ssc = StreamingContext(self.sc, self.duration)
0 commit comments