[ https://issues.apache.org/jira/browse/MAPREDUCE-2208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13607724#comment-13607724 ]
Marcelo Elias Del Valle commented on MAPREDUCE-2208: ---------------------------------------------------- Oh, just to complement, I realized you possible meant something different from your question... You are concerned about a single CSV line be split in two among different splits, right? No, that won't happen because I wrote a custom reader, that reads N lines at a time. The getSplits method uses the reader to correct get N lines and perform the splits, so getSplits will never return half of a line, you can actually configure how many lines you want on each split. Yes, this is also a valid concern and I took care about it. I am sorry, I hadn't understood well your question the first time I read it. > Flexible CSV text parser InputFormat > ------------------------------------ > > Key: MAPREDUCE-2208 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-2208 > Project: Hadoop Map/Reduce > Issue Type: New Feature > Reporter: Lance Norskog > Priority: Trivial > Attachments: CSVTextInputFormat.java, TestCSVTextFormat.java > > > CSVTextInputFormat is a configurable CSV parser tuned to most of the > csv-style datasets I've found. The Hadoop samples I've seen all > FileInputFormat and Mapper<LongWritable,Text>. They drop the Longwritable key > and parse the Text value as a CSV line. But, they are all custom-coded for > the format. > CSVTextInputFormat takes any csv-encoded file and rearrange the fields into > the format required by a Mapper. You can drop fields & rearrange them. There > is also a random sampling option to make training/test runs easier. > Attached are CSVTextInputFormat.java and a unit test for it. Both go into > org.apache.hadoop.mapreduce.lib.input under src/java and test/mapred/src. > This is compiled against hadoop-0.0.20. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira