What are you collecting in your map?  Are you just passing 'key'?  And are you 
sure you want to use map reduce for this job?  It doesn't seem to make sense to 
me, but I'm rather new.



-----Original Message-----
From: pols cut [mailto:[EMAIL PROTECTED]
Sent: Sat 10/25/2008 8:32 PM
To: [email protected]
Subject: writable class to be used to read floating point values from input?
 
I am trying to write a map reduce function which takes take the following types 
of <key,value> pairs


Map function -- should read floating point values (i dont really care about  
key)
it should output <null,floatwritable>

reduce -- input- <null,floatwritable>
                output <null,floatwritable>

I Have set the input format to be TextInputFormat.class   (is this right?)

Please tell me what signature am I supposed to use for the Map/ reduce methods?
  as of now I am trying to write the Map function as 

public static class Map extends MapReduceBase implements Mapper<LongWritable,  
FloatWritable, Text, FloatWritable>
    {
        public void map(LongWritable key,  FloatWritable value, 
OutputCollector<Text, FloatWritable> output, Reporter reporter) throws 
IOException
{ ...........
..........
}
}

But I am getting an error saying text cannot be cast to longwritable. 



      Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/

Reply via email to