Using aggregateByKey instead of groupBy()