[JAVA-11122] Allow multiple contexts to prevent failing tests
This commit is contained in:
parent
39e01903c2
commit
3aacf5a5a8
|
@ -26,8 +26,11 @@ public class ActionsUnitTest {
|
|||
|
||||
@BeforeClass
|
||||
public static void init() {
|
||||
SparkConf conf = new SparkConf().setAppName("reduce")
|
||||
.setMaster("local[*]");
|
||||
SparkConf conf = new SparkConf()
|
||||
.setAppName("reduce")
|
||||
.setMaster("local[*]")
|
||||
.set("spark.driver.allowMultipleContexts", "true");
|
||||
|
||||
sc = new JavaSparkContext(conf);
|
||||
tourists = sc.textFile("data/Tourist.csv").filter(line -> !line.startsWith("Region"));
|
||||
}
|
||||
|
|
|
@ -23,8 +23,11 @@ public class TransformationsUnitTest {
|
|||
|
||||
@BeforeClass
|
||||
public static void init() {
|
||||
SparkConf conf = new SparkConf().setAppName("uppercaseCountries")
|
||||
.setMaster("local[*]");
|
||||
SparkConf conf = new SparkConf()
|
||||
.setAppName("uppercaseCountries")
|
||||
.setMaster("local[*]")
|
||||
.set("spark.driver.allowMultipleContexts", "true");
|
||||
|
||||
sc = new JavaSparkContext(conf);
|
||||
tourists = sc.textFile("data/Tourist.csv")
|
||||
.filter(line -> !line.startsWith("Region")); //filter header row
|
||||
|
|
Loading…
Reference in New Issue