hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lance Norskog (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MAPREDUCE-2208) Flexible CSV text parser InputFormat
Date Mon, 06 Dec 2010 04:32:12 GMT

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

Lance Norskog commented on MAPREDUCE-2208:
------------------------------------------

Artfully phrased. Ah, the virtues of the passive voice.

I only learned enough file i/o to make this work. And I only work in small development datasets,
not production. So, no, it never impinged that it would need more stuff to support multifile
directories. This is in hadoop-20.0.2. I work in Mahout, not Hadoop. I'm not upgrading Hadoop
until Mahout makes me.

How did you envision this modification? It looks like the RecordReader would be public and
would need a constructor matching this line:

org.apache.hadoop.mapred.lib.CombineFileRecordReader<K, V>:144
      curReader =  rrConstructor.newInstance(new Object [] 
                            {split, jc, reporter, Integer.valueOf(idx)});









> 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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message