Not sure I understand.  That `HashPartitioner` serves as the identity map on the `blockId`s.  The `blockId` in the `mapPartitionsWithValues` on the next line coincides with the `blockId`s of all of the ratings in `elements`.

`makeLinkRDDs` returns two RDDs that are both partitioned by that `HashPartitioner`.