Shewhart chart or Control Chart is a method to detect abnormal events among a time series. Events must only be numbers.
If you want to check the improvements the spark library can introduce, you can find a test
src/test/scala/io/datalayer/shewhartcontrol that tests 40,000,000 events.
If you want to change the number of workers in you spark context, you have to set the following lines
val sc = SparkContextManager.getSparkContext(8)
8 indicates the number of workers.
val measures = sc.parallelize(Array[Double](5, 5, 5, 5, 5, 5, 5, 5, 19)) val cc = new ShewartControl() cc.setStdLimit(5.0) cc.computeLimit(measures) cc summary(measures)