spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashish Soni <asoni.le...@gmail.com>
Subject Convert CSV lines to List of Objects
Date Wed, 01 Jul 2015 17:00:14 GMT
Hi ,

How can i use Map function in java to convert all the lines of csv file
into a list of objects , Can some one please help...

JavaRDD<List<Charge>> rdd = sc.textFile("data.csv").map(new
Function<String, List<Charge>>() {
            @Override
            public List<Charge> call(String s) {

            }
        });

Thanks,

Mime
View raw message