learning-spark
learning-spark copied to clipboard
Want to create a Row Object In Java
In my analysis code I want to create a JavaRDD of type Row from another data. Can u provide me solution for this
Step 1. Convert a Collection of Strings or a text file to JavaRDD <String>.
- sparkContext.parallize(collection)
Step 2. Map the stringRDD to a rowRDD 2)rdd.map(RowFactory.create(string[0],string[1])