Assert.assertEquals(12, union.count());
union = union.cache();
Assert.assertEquals(12, union.count());
Assert.assertEquals(20, rdd.sum(), 0.01);
StatCounter stats = rdd.stats();
Assert.assertEquals(20, stats.sum(), 0.01);
Assert.assertEquals(20/6.0, rdd.mean(), 0.01);
Assert.assertEquals(20/6.0, rdd.mean(), 0.01);
Assert.assertEquals(6.22222, rdd.variance(), 0.01);
Assert.assertEquals(7.46667, rdd.sampleVariance(), 0.01);
Assert.assertEquals(2.49444, rdd.stdev(), 0.01);