Anonymous
Not applicable

@Shelly Bhardwaj​ :

The error message you provided seems to be incomplete, as it only shows the traceback of a serialization error. Can you provide the full error message or describe the issue in more detail?

Regarding the code you provided, it looks correct and should return the first two elements of the RDD without any errors.