Added a unionAndFlatten() in RDDUtils