Return-Path: Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: (qmail 86356 invoked from network); 24 Sep 2010 07:15:27 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Sep 2010 07:15:27 -0000 Received: (qmail 91039 invoked by uid 500); 24 Sep 2010 07:15:27 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 90550 invoked by uid 500); 24 Sep 2010 07:15:23 -0000 Mailing-List: contact mapreduce-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-user@hadoop.apache.org Delivered-To: mailing list mapreduce-user@hadoop.apache.org Received: (qmail 90542 invoked by uid 99); 24 Sep 2010 07:15:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Sep 2010 07:15:22 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [202.137.237.182] (HELO pro237-182.mxout.rediffmailpro.com) (202.137.237.182) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 24 Sep 2010 07:15:16 +0000 Received: (qmail 14426 invoked by uid 510); 24 Sep 2010 07:13:40 -0000 X-CTCH-Spam: Unknown X-CTCH-VOD: Unknown X-CTCH-Flags: : 0 X-CTCH-RefID: str=0001.0A0B0201.4C9C4FEC.01D5,ss=1,fgs=0 Date: 24 Sep 2010 07:13:39 -0000 MIME-Version: 1.0 To: , Received: from unknown 59.97.192.167 by rediffmail.com via HTTP; 24 Sep 2010 07:13:39 -0000 Message-ID: <1284911119.S.26726.H.TkNocmlzdG9waGVyLlNoYWluQHN1bmdhcmQuY29tAFJFOiBIb3cgdG8gY3JlYXRlIGEgY29tcG9zaXRlIA__.34090.pro-237-56.old.1285312419.12742@webmail.rediffmail.com> Subject: =?utf-8?B?UmU6IFJFOiBIb3cgdG8gY3JlYXRlIGEgY29tcG9zaXRlIHZhbHVlIG9iamVjdCBmb3Igb3V0cHV0IGZyb20gTWFwIG1ldGhvZA==?= From: "Kunal Gupta" Content-Type: multipart/alternative; boundary="=_ea0e708e0d8effcb3e2bea384605ce0a" --=_ea0e708e0d8effcb3e2bea384605ce0a Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="UTF-8" Can anyone please help me in unsubscribing from the mailing lists?i send mails to the unsubscribe ids of different groups in response to which i get a confirmation mail, but the addresses on which thoseconfirmation mails ask me to reply to are too weird and automatically get shortened by my email client.- Kindly help.Kunal Gupta On Sun, 19 Sep 2010 21:15:19 +0530 wrote > I think your first approach at serializing is correct, except for the use of ObjectWritable.  From the docs, ObjectWritable only handles Strings, Arrays, and primitives.  You are trying to use it to serialize your ArrayList.  Try converting the ArrayList to an array of Strings first. As for the second problem, I’d have a look at Cascading Hope these help… Chris From: Bhaskar Ghosh [mailto:bjgindia@yahoo.co.in] Sent: Sunday, September 19, 2010 6:22 AM To: mapreduce-user@hadoop.apache.org Subject: How to create a composite value object for output from Map method Hi All, What would be the right approach to solve this problem: I need to output an object as the value from my map method. The object's class should have two mambers: an ArrayList and another, an integer. I used following two ways, but they are not working: I wrote a class MyCompositeValueWritable that implements Writable interface. Inside the overridden readFields and write methods, I try to read/write using the ObjectWritable class. [see attached file MyWordCount_ObjVal1_2.java] The custom class is a plain class 'MyCompositeValue' not implementing or inheriting anything. The Map and Reduce methods try to output the MyCompositeValue> > using the ObjectWritable class. [see attached file Case2.txt] Am I going wrong somewhere? Appreciate any help. I have another problem, in which I need two types of mappers and reducer, and I want to execute them in this order: Mapper1 -> Reducer1 -> Mapper2 -> Reducer2 Is it possible through ChainMapper and/or ChainReducer classes? It yes, then how? Can anybody provide some starting working example, or point me to some good url for the same? Currently, I am doing it as a work-around: The first set of Mapper-Reducer write to HDFS. Then the second set of Mapper-Reducer pick up that output file from HDFS and writes further processed output to another HDFS directory. An example would be really really helpful. Thanks Bhaskar Ghosh "Ignorance is Bliss... Knowledge never brings Peace!!!" --=_ea0e708e0d8effcb3e2bea384605ce0a Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="UTF-8"
Can anyone please help me in unsubscribing from the mailing lists?
i send mails to the unsubscribe ids of different groups in response = to 
which i get a confirmation mail, but the addresses on wh= ich those
confirmation mails ask me to reply to are too weird and= automatically 
get shortened by my email client.
= - Kindly help.
Kunal Gupta


On Sun, 19 Sep= 2010 21:15:19 +0530 wrote
>



I think your first appro= ach at serializing is correct, except
for the use of ObjectWritable.&nbs= p; From the docs, ObjectWritable only handles
Strings, Arrays, and primi= tives.  You are trying to use it to serialize your ArrayList. Try converting the ArrayList to an array of Strings first.



= As for the second problem, I=E2=80=99d have a look at Cascading


=
Hope these help=E2=80=A6



Chris






From: Bhaskar Ghosh
[mailto:bjgindia@yahoo.co.in]

Sent: Su= nday, September 19, 2010 6:22 AM

To: mapreduce-user@hadoop.apache.or= g

Subject: How to create a composite value object for output from Ma= p
method













Hi All,<= br>










What would be the
right a= pproach to solve this problem:






I need to
= output an object as the value from my map method. The object's class
= should have two mambers: an ArrayList and another, an
i= nteger.



I used following two ways, but they are no= t working:



I
wrote a class MyCompositeValueWritable= that implements Writable
interface.
Inside
the overrid= den readFields and write methods, I try to read/write using the
Obj= ectWritable class.
[see
attached file MyWordCount_ObjVal1_2.jav= a]





The
custom class is a plain c= lass 'MyCompositeValue' not implementing or
inheriting anything. The
Map and Reduce methods try to output the
MyCompositeValue> > using the ObjectWritable = class.
[see
attached file Case2.txt]


Am I going w= rong somewhere? Appreciate any help.





I have
= another problem, in which I need two types of mappers and reducer, and I want to execute them in this order:





Map= per1
-> Reducer1 -> Mapper2 -> Reducer2
Is it
= possible through ChainMapper and/or ChainReducer classes? It yes, the= n
how? Can anybody provide some starting working example, or poin= t me to
some good url for the same?
Currently,
I = am doing it as a work-around:








= The first
set of Mapper-Reducer write to HDFS. Then the secon= d set of
Mapper-Reducer pick up that output file from HDFS and w= rites further
processed output to another HDFS directory.
=







An example
would be real= ly really helpful.












Th= anks

Bhaskar Ghosh



"Ignorance is Bliss... Knowledge n= ever brings Peace!!!"













--=_ea0e708e0d8effcb3e2bea384605ce0a--