Can JavaPairRDD ever take an Array instead of a Tuple2 in Spark Java?

227 Views Asked by At

I reading the "Learning Spark" book and for example 5-14, I noticed that a JavaPairRDD<String[]> was declared. I'm pretty sure that JavaPairRDD's can only take Tuple2s (i.e. for Key and Value) but I wasn't sure if there was some weird implicit conversion going on from String[] to Tuple2 somehow.

I can't find any other examples of this online except for this exact example.

Here's a link to the page in the book.

0

There are 0 best solutions below