hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcelo Elias Del Valle (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-2208) Flexible CSV text parser InputFormat
Date Wed, 20 Mar 2013 15:29:17 GMT

    [ https://issues.apache.org/jira/browse/MAPREDUCE-2208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13607716#comment-13607716
] 

Marcelo Elias Del Valle commented on MAPREDUCE-2208:
----------------------------------------------------

Christian, this is a valid concern. Actually, when I created the first version of this input
format, I had chosen to have the CSV line numbers as the keys. Indeed, it worked well until
I tested it on a cluster (amazon EMR with 15 instances). When I did, I realized the line numbers
wasn't a good key, as it wouldn't get the right results among cluster nodes.
I fixed that to use the file position as input key, just as NLineInputFormat does (http://hadoop.apache.org/docs/current/api/org/apache/hadoop/mapred/lib/NLineInputFormat.html)
I have tested it a lot and so far I found no problems. However, if you find some problem I
didn't see, please tell me, as I would be very interested in fixing 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

Mime
View raw message