hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Devaraj K <devara...@huawei.com>
Subject RE: executing map/reduce and different file's format
Date Tue, 12 Jul 2011 10:41:44 GMT
Hi Oleg,

     It is not required to know the each line read from which file. If you
want to process multiple input formats of files with same job you can use
any of these below API's from MultipleInputs class. You can specify
different formats for different files.



1. public static void addInputPath(JobConf conf,
                                Path path,
                                Class<? extends InputFormat>
inputFormatClass)


2. public static void addInputPath(JobConf conf,
                                Path path,
                                Class<? extends InputFormat>
inputFormatClass,
                                Class<? extends Mapper> mapperClass)

Devaraj K 
----------------------------------------------------------------------------
---------------------------------------------------------
This e-mail and its attachments contain confidential information from
HUAWEI, which 
is intended only for the person or entity whose address is listed above. Any
use of the 
information contained herein in any way (including, but not limited to,
total or partial 
disclosure, reproduction, or dissemination) by persons other than the
intended 
recipient(s) is prohibited. If you receive this e-mail in error, please
notify the sender by 
phone or email immediately and delete it!ss
 
-----Original Message-----
From: Oleg Ruchovets [mailto:oruchovets@gmail.com] 
Sent: Tuesday, July 12, 2011 2:01 PM
To: common-user@hadoop.apache.org
Subject: executing map/reduce and different file's format

Hi ,

    I have to run map/reduce job. Inputs to this job will be files with
different formats .
question:
       processing line from file , how can I check (know)  from which  file
this line was read?

Thanks in advance
Oleg.


Mime
View raw message