hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pols cut <pols_...@yahoo.co.in>
Subject writable class to be used to read floating point values from input?
Date Sun, 26 Oct 2008 03:32:03 GMT
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