I follow this [example](https://databricks-training.s3.amazonaws.com/movie-recommendation-with-mllib.html) to create a simple personalized demo recommender using Spark MLLib.

I slightly misunderstand the meaning of `_._2.user` and `_._2.product` in these lines of code:

```
val numUsers = ratings.map(_._2.user).distinct.count
val numMovies = ratings.map(_._2.product).distinct.count

```

What `2` is indicating? Also it looks like `user` and `product` appear for the first time in this line. So, how they are linked to `userId` and `movieId`?