I think you are simply looking for a case class in Scala. It is a
simple way to define an object with named, typed fields.

On Fri, Sep 26, 2014 at 8:31 AM, rzykov <[email protected]> wrote:
> Could you advise the  best practice of using some "named tuples" in Scala
> with Spark RDD.
> Currently we can access by a field number in a tuple:
>
> RDD.map{_.2}
>
> But want to see such construction:
>
> RDD.map{_.itemId}
>
> This one will be helpful for debugging purposes.
>
>
>
> --
> View this message in context: 
> http://apache-spark-user-list.1001560.n3.nabble.com/Access-by-name-in-tuples-in-Scala-with-Spark-tp15212.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to