Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce >> mail # user >> Question on how to get input file name in MapReduce app


Copy link to this message
-
Re: Question on how to get input file name in MapReduce app
You may grep it from the Context object that passed to
map/reduce/setup/cleanup method.

context.getInputSplit() return a InputSplit object which ,in most of the
case ,is type of FileInputSplit.

if using a not standard FileInputFormat,refer to the getSplit() method of
that certain InputFormat.

On Sat, Mar 17, 2012 at 8:35 PM, Qu Chen <[EMAIL PROTECTED]> wrote:

> I am trying to write a map-reduce application in which the mapper function
> is aware of the input HDFS filename of its data split. Anyone know how to
> do that?
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB