You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Harsh J <ha...@cloudera.com> on 2011/05/05 11:56:58 UTC

Re: Use different process method to process data by input file name?

Moving this to mapreduce--user@ since that is more appropriate for
hadoop-mapreduce questions (bcc: common-user@).

2011/5/5 王志强 <wa...@360.cn>:
> Hi, guys
>      As the topic shows, how can I use different process methods to process data according to input file name in map function? Ie, May I get the input file name that current process line belong to?
>                                              Austin
>

You can get the filename using these additional JVM properties of the
MapTasks: http://hadoop.apache.org/common/docs/r0.20.2/mapred_tutorial.html#Task+JVM+Reuse
[Look at the table right below the link anchor for all properties, and
map.input.file in particular]

-- 
Harsh J