spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raghav <raghavas...@gmail.com>
Subject newbie question about RDD
Date Tue, 22 Nov 2016 05:45:03 GMT
Hi

I am extremely new to Spark. I have to read a file form HDFS, and get it in
memory  in RDD format.

I have a Java class as follows:

class Person {
    private long UUID;
    private String FirstName;
    private String LastName;
    private String zip;

   // public methods
}

The file in HDFS is as follows:

UUID.     FirstName         LastName     Zip
7462       John                 Doll                06903
5231       Brad                 Finley             32820


Can someone point me how to get a JavaRDD<Person> object by reading the
file in HDFS ?

Thanks.

-- 
Raghav

Mime
View raw message