Re: How to set object in Configuration

2011-01-26 Thread Harsh J
Convert (Serialize) your object to String and set it with Configuration.set(keyString, valueString). On Thu, Jan 27, 2011 at 12:30 PM, Joan wrote: > Hi Li, > > Ye I agree but my object implements serializable but how to indicate it in > hadoop's configuration? > > Joan > > 2011/1/27 li ping >> >

Re: How to set object in Configuration

2011-01-26 Thread Joan
Hi Li, Ye I agree but my object implements serializable but how to indicate it in hadoop's configuration? Joan 2011/1/27 li ping > yes, I agree. The configuration parameter should be a serialize-able value. > because the parameter will be transfer to other node to run the job. If the > value c

Re: How to set object in Configuration

2011-01-26 Thread li ping
yes, I agree. The configuration parameter should be a serialize-able value. because the parameter will be transfer to other node to run the job. If the value can not be serialized, I believe it should be a problem. On Wed, Jan 26, 2011 at 11:52 PM, David Rosenstrauch wrote: > On 01/26/2011 05:43

how to write to different table in map/reduce than target table?

2011-01-26 Thread Hiller, Dean (Contractor)
I have a map/reduce job I coded up to play with this and there is this line that sets the table TableMapReduceUtil.initTableReducerJob(tableName, null, job); Then the Put objects take a column family but no table so it seems like I can only operate on the table I am currently using? How to

Re: PiEstimator error - Type mismatch in key from map

2011-01-26 Thread Tsz Wo (Nicholas), Sze
Okay, I got it now. You were talking about your programs but not the PiEstimator example came from Hadoop. Then, you have to set "mapred.output.key.class" and "mapred.output.value.class" as Srihari mentioned. Below are the APIs. //new API final Job job = ... job.setMapOutputKeyC

Re: PiEstimator error - Type mismatch in key from map

2011-01-26 Thread Srihari Anantha Padmanabhan
I am using Hadoop 0.20.2. I just wrote my own map-reduce program based on the map-reduce tutorial at http://hadoop.apache.org/common/docs/r0.20.2/mapred_tutorial.html On Jan 26, 2011, at 10:27 AM, Pedro Costa wrote: > Hadoop 20.1 > > On Wed, Jan 26, 2011 at 6:26 PM, Tsz Wo (Nicholas), Sze >

Re: PiEstimator error - Type mismatch in key from map

2011-01-26 Thread Pedro Costa
Hadoop 20.1 On Wed, Jan 26, 2011 at 6:26 PM, Tsz Wo (Nicholas), Sze wrote: > Hi Srihari, > > Same questions to you: Which version of Hadoop are you using?  And where did > you get the examples?  I guess you were able to reproduce it.  I suspect the > examples and the Hadoop are in different versi

Re: PiEstimator error - Type mismatch in key from map

2011-01-26 Thread Tsz Wo (Nicholas), Sze
Hi Srihari, Same questions to you: Which version of Hadoop are you using? And where did you get the examples? I guess you were able to reproduce it. I suspect the examples and the Hadoop are in different versions. Nicholas From: Srihari Anantha Padmanab

Re: PiEstimator error - Type mismatch in key from map

2011-01-26 Thread Srihari Anantha Padmanabhan
I got a similar error before in one of my projects. I had to set the values for "mapred.output.key.class" and "mapred.output.value.class". That resolved the issue for me. Srihari On Jan 26, 2011, at 10:09 AM, Pedro Costa wrote: Yes, I can reproduce it deterministically. But, I also did some ch

Re: PiEstimator error - Type mismatch in key from map

2011-01-26 Thread Tsz Wo (Nicholas), Sze
Thanks for the info. I ran PiEstimator many many times and never have observed such problem. Nicholas From: Pedro Costa To: mapreduce-user@hadoop.apache.org Sent: Wed, January 26, 2011 10:09:36 AM Subject: Re: PiEstimator error - Type mismatch in key from map

Re: PiEstimator error - Type mismatch in key from map

2011-01-26 Thread Pedro Costa
Yes, I can reproduce it deterministically. But, I also did some changes to the Hadoop MR code. Most definitely this is the reason. I'm looking throughly through the code. I'll say something after I find the problem. I was just wondering if this error has happened to someone before. Maybe I could

Re: PiEstimator error - Type mismatch in key from map

2011-01-26 Thread Tsz Wo (Nicholas), Sze
Hi Pedro, This is interesting. Which version of Hadoop are you using? And where did you get the example class files? Also, are you able to reproduce it deterministically? Nicholas From: Pedro Costa To: mapreduce-user@hadoop.apache.org Sent: Wed, January 26

Re: How to set object in Configuration

2011-01-26 Thread David Rosenstrauch
On 01/26/2011 05:43 AM, Joan wrote: Hi, I'm trying set Object into Hadoop's configuration but I don't know how to. I'm want to do: org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration(); conf.set("txt",myObject); But It doesn't exist method like: conf.set(Stri

Re: How to pass object between jobs

2011-01-26 Thread Chase Bradford
You can make you object implement o.a.h.io.Writable and use the SequenceFileOutputFormat and SequenceFileInputFormat in job 1 and 2 respectively. If something prevents you from implementing writable, but you can implement Serializable then you can add o.a.h.io.serialization.JavaSerialization to

PiEstimator error - Type mismatch in key from map

2011-01-26 Thread Pedro Costa
Hi, I run the PI example of hadoop, and I've got the following error: [code] java.io.IOException: Type mismatch in key from map: expected org.apache.hadoop.io.BooleanWritable, recieved org.apache.hadoop.io.LongWritable at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.collect(MapTask.j

How to set object in Configuration

2011-01-26 Thread Joan
Hi, I'm trying set Object into Hadoop's configuration but I don't know how to. I'm want to do: org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration(); conf.set("txt",myObject); But It doesn't exist method like: conf.set(String,Object) Someone know how to set cu