@Override
			public Integer call(Integer integer) {
				double x = Math.random() * 2 - 1;
				double y = Math.random() * 2 - 1;
				return (x * x + y * y < 1) ? 1 : 0;
			}
SparkPi Sample Code that utilizes spark master calls to generate a rough estimate of pi.

@author Glenn Renfro
spring-xd-integration-test/acceptance-test-sparkapp/src/main/java/spark/SparkPi.java