Generating unique numeric values
There are a bunch of different ways of generating unique numeric ids in spark.
Here are some functions to utilize to accomplish that:
They all have their pros and cons. What you choose depends on
1) whether it works (you get uniqueness or not) and
2) whether you like the properties of the ids you end up having.