hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Malcolm Matalka" <mmata...@millennialmedia.com>
Subject RE: writable class to be used to read floating point values from input?
Date Sun, 26 Oct 2008 03:48:36 GMT
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:pols_cut@yahoo.co.in]
Sent: Sat 10/25/2008 8:32 PM
To: core-user@hadoop.apache.org
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>

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/

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message