Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop >> mail # general >> how to get the current input file in a Mapper


Copy link to this message
-
Re: how to get the current input file in a Mapper
How about:
FileSplit fileSplit = (FileSplit) context.getInputSplit();
String sFileName = fileSplit.getPath().getName();
On Sun, Jun 27, 2010 at 7:59 AM, zhangguoping zhangguoping <
[EMAIL PROTECTED]> wrote:

> Hi,
>
> how to get the current input file in a Mapper in 0.20.2 ?
>
> Thanks,
>