Read more about the article Apache Spark RDD groupBy transformation
Apache Spark RDD groupBy transformation

Apache Spark RDD groupBy transformation

As per Apache Spark documentation, groupBy returns an RDD of grouped items where each group consists of a key and a sequence of elements.