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 Vikas Jadhav <vi...@gmail.com> on 2013/02/12 08:05:16 UTC

number input files to mapreduce job

Hi all,
How to get number of Input files and thier to particular mapreduce job in
java MapReduce  program.

-- 
*
*
*

Thanx and Regards*
* Vikas Jadhav*

RE: number input files to mapreduce job

Posted by java8964 java8964 <ja...@hotmail.com>.
I don't think you can get list of all input files in the mapper, but what you can get is the current file's information.
In the context object reference, you can get the InputSplit(), which should give you all the information you want of the current input file.
http://hadoop.apache.org/docs/r2.0.2-alpha/api/org/apache/hadoop/mapred/FileSplit.html
Date: Tue, 12 Feb 2013 12:35:16 +0530
Subject: number input files to mapreduce job
From: vikascjadhav87@gmail.com
To: user@hadoop.apache.org

Hi all,How to get number of Input files and thier to particular mapreduce job in java MapReduce  program.
-- 



Thanx and Regards Vikas Jadhav 		 	   		  

RE: number input files to mapreduce job

Posted by java8964 java8964 <ja...@hotmail.com>.
I don't think you can get list of all input files in the mapper, but what you can get is the current file's information.
In the context object reference, you can get the InputSplit(), which should give you all the information you want of the current input file.
http://hadoop.apache.org/docs/r2.0.2-alpha/api/org/apache/hadoop/mapred/FileSplit.html
Date: Tue, 12 Feb 2013 12:35:16 +0530
Subject: number input files to mapreduce job
From: vikascjadhav87@gmail.com
To: user@hadoop.apache.org

Hi all,How to get number of Input files and thier to particular mapreduce job in java MapReduce  program.
-- 



Thanx and Regards Vikas Jadhav 		 	   		  

Re: number input files to mapreduce job

Posted by Mahesh Balija <ba...@gmail.com>.
Hi Vikas,

                 You can get the FileSystem instance by calling
FileSystem.get(Configuration);
                 Once you get the FileSystem instance you can use
FileSystem.listStatus(InputPath); to get the fileStatus instances.

Best,
Mahesh Balija,
Calsoft Labs.

On Tue, Feb 12, 2013 at 12:35 PM, Vikas Jadhav <vi...@gmail.com>wrote:

> Hi all,
> How to get number of Input files and thier to particular mapreduce job in
> java MapReduce  program.
>
> --
> *
> *
> *
>
> Thanx and Regards*
> * Vikas Jadhav*
>

Re: number input files to mapreduce job

Posted by Mahesh Balija <ba...@gmail.com>.
Hi Vikas,

                 You can get the FileSystem instance by calling
FileSystem.get(Configuration);
                 Once you get the FileSystem instance you can use
FileSystem.listStatus(InputPath); to get the fileStatus instances.

Best,
Mahesh Balija,
Calsoft Labs.

On Tue, Feb 12, 2013 at 12:35 PM, Vikas Jadhav <vi...@gmail.com>wrote:

> Hi all,
> How to get number of Input files and thier to particular mapreduce job in
> java MapReduce  program.
>
> --
> *
> *
> *
>
> Thanx and Regards*
> * Vikas Jadhav*
>

RE: number input files to mapreduce job

Posted by java8964 java8964 <ja...@hotmail.com>.
I don't think you can get list of all input files in the mapper, but what you can get is the current file's information.
In the context object reference, you can get the InputSplit(), which should give you all the information you want of the current input file.
http://hadoop.apache.org/docs/r2.0.2-alpha/api/org/apache/hadoop/mapred/FileSplit.html
Date: Tue, 12 Feb 2013 12:35:16 +0530
Subject: number input files to mapreduce job
From: vikascjadhav87@gmail.com
To: user@hadoop.apache.org

Hi all,How to get number of Input files and thier to particular mapreduce job in java MapReduce  program.
-- 



Thanx and Regards Vikas Jadhav 		 	   		  

Re: number input files to mapreduce job

Posted by Mahesh Balija <ba...@gmail.com>.
Hi Vikas,

                 You can get the FileSystem instance by calling
FileSystem.get(Configuration);
                 Once you get the FileSystem instance you can use
FileSystem.listStatus(InputPath); to get the fileStatus instances.

Best,
Mahesh Balija,
Calsoft Labs.

On Tue, Feb 12, 2013 at 12:35 PM, Vikas Jadhav <vi...@gmail.com>wrote:

> Hi all,
> How to get number of Input files and thier to particular mapreduce job in
> java MapReduce  program.
>
> --
> *
> *
> *
>
> Thanx and Regards*
> * Vikas Jadhav*
>

Re: number input files to mapreduce job

Posted by Mahesh Balija <ba...@gmail.com>.
Hi Vikas,

                 You can get the FileSystem instance by calling
FileSystem.get(Configuration);
                 Once you get the FileSystem instance you can use
FileSystem.listStatus(InputPath); to get the fileStatus instances.

Best,
Mahesh Balija,
Calsoft Labs.

On Tue, Feb 12, 2013 at 12:35 PM, Vikas Jadhav <vi...@gmail.com>wrote:

> Hi all,
> How to get number of Input files and thier to particular mapreduce job in
> java MapReduce  program.
>
> --
> *
> *
> *
>
> Thanx and Regards*
> * Vikas Jadhav*
>

RE: number input files to mapreduce job

Posted by java8964 java8964 <ja...@hotmail.com>.
I don't think you can get list of all input files in the mapper, but what you can get is the current file's information.
In the context object reference, you can get the InputSplit(), which should give you all the information you want of the current input file.
http://hadoop.apache.org/docs/r2.0.2-alpha/api/org/apache/hadoop/mapred/FileSplit.html
Date: Tue, 12 Feb 2013 12:35:16 +0530
Subject: number input files to mapreduce job
From: vikascjadhav87@gmail.com
To: user@hadoop.apache.org

Hi all,How to get number of Input files and thier to particular mapreduce job in java MapReduce  program.
-- 



Thanx and Regards Vikas Jadhav