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 "Shrivastava, Himnshu (GE Global Research, Non-GE)" <Hi...@ge.com> on 2014/06/18 14:44:53 UTC

Query map reduce

Hi,

I am writing a simple map reduce code in java. How can I get multiple key- value pairs as output from a single mapper. If there is any preferred link for that, please let me know. I tried using hash map for it but there exist some errors in the same. Can an object of output collector emit multiple key value pairs ?

Regards,

Re: Query map reduce

Posted by Dhaval Shah <pr...@yahoo.co.in>.
Just call context.write multiple times
 

Regards,
Dhaval


________________________________
 From: "Shrivastava, Himnshu (GE Global Research, Non-GE)" <Hi...@ge.com>
To: "user@hadoop.apache.org" <us...@hadoop.apache.org> 
Sent: Wednesday, 18 June 2014 8:44 AM
Subject: Query map reduce
 


 
Hi,
 
I am writing a simple map reduce code in java. How can I get multiple key- value pairs as output from a single mapper. If there is any preferred link for that, please let me know. I tried using hash map for it but there exist some errors in the same. Can an object of output collector emit multiple key value pairs ?
 
Regards,

Re: Query map reduce

Posted by Raj K Singh <ra...@gmail.com>.
call context.write() to emit keys/values based on some conditions.

::::::::::::::::::::::::::::::::::::::::
Raj K Singh
http://in.linkedin.com/in/rajkrrsingh
http://www.rajkrrsingh.blogspot.com
Mobile  Tel: +91 (0)9899821370


On Wed, Jun 18, 2014 at 6:14 PM, Shrivastava, Himnshu (GE Global Research,
Non-GE) <Hi...@ge.com> wrote:

>  Hi,
>
>
>
> I am writing a simple map reduce code in java. How can I get multiple key-
> value pairs as output from a single mapper. If there is any preferred link
> for that, please let me know. I tried using hash map for it but there exist
> some errors in the same. Can an object of output collector emit multiple
> key value pairs ?
>
>
>
> Regards,
>

Re: Query map reduce

Posted by Raj K Singh <ra...@gmail.com>.
call context.write() to emit keys/values based on some conditions.

::::::::::::::::::::::::::::::::::::::::
Raj K Singh
http://in.linkedin.com/in/rajkrrsingh
http://www.rajkrrsingh.blogspot.com
Mobile  Tel: +91 (0)9899821370


On Wed, Jun 18, 2014 at 6:14 PM, Shrivastava, Himnshu (GE Global Research,
Non-GE) <Hi...@ge.com> wrote:

>  Hi,
>
>
>
> I am writing a simple map reduce code in java. How can I get multiple key-
> value pairs as output from a single mapper. If there is any preferred link
> for that, please let me know. I tried using hash map for it but there exist
> some errors in the same. Can an object of output collector emit multiple
> key value pairs ?
>
>
>
> Regards,
>

Re: Query map reduce

Posted by Dhaval Shah <pr...@yahoo.co.in>.
Just call context.write multiple times
 

Regards,
Dhaval


________________________________
 From: "Shrivastava, Himnshu (GE Global Research, Non-GE)" <Hi...@ge.com>
To: "user@hadoop.apache.org" <us...@hadoop.apache.org> 
Sent: Wednesday, 18 June 2014 8:44 AM
Subject: Query map reduce
 


 
Hi,
 
I am writing a simple map reduce code in java. How can I get multiple key- value pairs as output from a single mapper. If there is any preferred link for that, please let me know. I tried using hash map for it but there exist some errors in the same. Can an object of output collector emit multiple key value pairs ?
 
Regards,

Re: Query map reduce

Posted by Raj K Singh <ra...@gmail.com>.
call context.write() to emit keys/values based on some conditions.

::::::::::::::::::::::::::::::::::::::::
Raj K Singh
http://in.linkedin.com/in/rajkrrsingh
http://www.rajkrrsingh.blogspot.com
Mobile  Tel: +91 (0)9899821370


On Wed, Jun 18, 2014 at 6:14 PM, Shrivastava, Himnshu (GE Global Research,
Non-GE) <Hi...@ge.com> wrote:

>  Hi,
>
>
>
> I am writing a simple map reduce code in java. How can I get multiple key-
> value pairs as output from a single mapper. If there is any preferred link
> for that, please let me know. I tried using hash map for it but there exist
> some errors in the same. Can an object of output collector emit multiple
> key value pairs ?
>
>
>
> Regards,
>

Re: Query map reduce

Posted by Dhaval Shah <pr...@yahoo.co.in>.
Just call context.write multiple times
 

Regards,
Dhaval


________________________________
 From: "Shrivastava, Himnshu (GE Global Research, Non-GE)" <Hi...@ge.com>
To: "user@hadoop.apache.org" <us...@hadoop.apache.org> 
Sent: Wednesday, 18 June 2014 8:44 AM
Subject: Query map reduce
 


 
Hi,
 
I am writing a simple map reduce code in java. How can I get multiple key- value pairs as output from a single mapper. If there is any preferred link for that, please let me know. I tried using hash map for it but there exist some errors in the same. Can an object of output collector emit multiple key value pairs ?
 
Regards,

Re: Query map reduce

Posted by Dhaval Shah <pr...@yahoo.co.in>.
Just call context.write multiple times
 

Regards,
Dhaval


________________________________
 From: "Shrivastava, Himnshu (GE Global Research, Non-GE)" <Hi...@ge.com>
To: "user@hadoop.apache.org" <us...@hadoop.apache.org> 
Sent: Wednesday, 18 June 2014 8:44 AM
Subject: Query map reduce
 


 
Hi,
 
I am writing a simple map reduce code in java. How can I get multiple key- value pairs as output from a single mapper. If there is any preferred link for that, please let me know. I tried using hash map for it but there exist some errors in the same. Can an object of output collector emit multiple key value pairs ?
 
Regards,

Re: Query map reduce

Posted by Raj K Singh <ra...@gmail.com>.
call context.write() to emit keys/values based on some conditions.

::::::::::::::::::::::::::::::::::::::::
Raj K Singh
http://in.linkedin.com/in/rajkrrsingh
http://www.rajkrrsingh.blogspot.com
Mobile  Tel: +91 (0)9899821370


On Wed, Jun 18, 2014 at 6:14 PM, Shrivastava, Himnshu (GE Global Research,
Non-GE) <Hi...@ge.com> wrote:

>  Hi,
>
>
>
> I am writing a simple map reduce code in java. How can I get multiple key-
> value pairs as output from a single mapper. If there is any preferred link
> for that, please let me know. I tried using hash map for it but there exist
> some errors in the same. Can an object of output collector emit multiple
> key value pairs ?
>
>
>
> Regards,
>