JAVA-938: Migrate spring-cloud-data-flow to parent-boot-2

This commit is contained in:
sampadawagde
2020-06-11 18:59:09 +05:30
parent 25748c358d
commit 40e6ac64d3
6 changed files with 12 additions and 25 deletions

View File

@@ -13,7 +13,7 @@ import java.util.stream.IntStream;
public class PiApproximation {
public static void main(String[] args) {
SparkConf conf = new SparkConf().setAppName("BaeldungPIApproximation");
SparkConf conf = new SparkConf().setAppName("BaeldungPIApproximation").setMaster("local[2]");
JavaSparkContext context = new JavaSparkContext(conf);
int slices = args.length >= 1 ? Integer.valueOf(args[0]) : 2;
int n = (100000L * slices) > Integer.MAX_VALUE ? Integer.MAX_VALUE : 100000 * slices;