Re: FW: Error running org.apache.hadoop.examples.DBCountPageView

2011-10-07 Thread Bejoy KS
Hi Clovis
  From the exception, it is clearly due to a type mismatch in the
Key Value flow between mapper,combiner and reducer. The reducer/combiner is
expecting a key from the mapper of type Text,but instead it is receiving a
Key of the type LongWritable. I didn't get a chance to debug the whole code,
but the code within the url you pasted uses the new map reduce API but the
trunk on hadoop-0.20.203 and hadoop-0.20.204 uses the old API. I tried
running both and it did work very well for me.

Try out this link for the same sample I ran for hadoop-0.20.203
http://www.javasourcecode.org/html/open-source/hadoop/hadoop-0.20.203.0/org/apache/hadoop/examples/DBCountPageView.java.html

Hope it helps!...


On Fri, Oct 7, 2011 at 9:08 PM, Ta, Le (Clovis)  wrote:

> Hi,
>
> I am getting the following exception when trying to run the DBCountPageView
> example obtained from
> http://search-hadoop.com/c/Map/Reduce:/src/examples/org/apache/hadoop/examples/DBCountPageView.java.
> I am using a PostgreSQL database. Any help would be greatly appreciated!
>
> java.io.IOException: Type mismatch in key from map: expected
> org.apache.hadoop.io.Text, recieved org.apache.hadoop.io.LongWritable
>at
> org.apache.hadoop.mapred.MapTask$MapOutputBuffer.collect(MapTask.java:871)
>at
> org.apache.hadoop.mapred.MapTask$NewOutputCollector.write(MapTask.java:574)
>at
> org.apache.hadoop.mapreduce.TaskInputOutputContext.write(TaskInputOutputContext.java:80)
>at org.apache.hadoop.mapreduce.Mapper.map(Mapper.java:124)
>at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
>at
> org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:647)
>at org.apache.hadoop.mapred.MapTask.run(MapTask.java:323)
>at
> org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:210)
> 11/10/06 08:48:37 INFO mapred.JobClient:  map 0% reduce 0%
> 11/10/06 08:48:37 INFO mapred.JobClient: Job complete: job_local_0001
> 11/10/06 08:48:37 INFO mapred.JobClient: Counters: 0
> 11/10/06 08:48:37 INFO examples.DBCountPageView: totalPageview=60
> 11/10/06 08:48:37 INFO examples.DBCountPageView: sumPageview=0
> java.lang.RuntimeException: Evaluation was not correct!
>at
> org.apache.hadoop.examples.DBCountPageView.run(DBCountPageView.java:439)
>at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
>at
> org.apache.hadoop.examples.DBCountPageView.main(DBCountPageView.java:452)
>
>
>


FW: Error running org.apache.hadoop.examples.DBCountPageView

2011-10-07 Thread Ta, Le (Clovis)
Hi,

I am getting the following exception when trying to run the DBCountPageView 
example obtained from 
http://search-hadoop.com/c/Map/Reduce:/src/examples/org/apache/hadoop/examples/DBCountPageView.java.
 I am using a PostgreSQL database. Any help would be greatly appreciated!

java.io.IOException: Type mismatch in key from map: expected 
org.apache.hadoop.io.Text, recieved org.apache.hadoop.io.LongWritable
at 
org.apache.hadoop.mapred.MapTask$MapOutputBuffer.collect(MapTask.java:871)
at 
org.apache.hadoop.mapred.MapTask$NewOutputCollector.write(MapTask.java:574)
at 
org.apache.hadoop.mapreduce.TaskInputOutputContext.write(TaskInputOutputContext.java:80)
at org.apache.hadoop.mapreduce.Mapper.map(Mapper.java:124)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:647)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:323)
at 
org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:210)
11/10/06 08:48:37 INFO mapred.JobClient:  map 0% reduce 0%
11/10/06 08:48:37 INFO mapred.JobClient: Job complete: job_local_0001
11/10/06 08:48:37 INFO mapred.JobClient: Counters: 0
11/10/06 08:48:37 INFO examples.DBCountPageView: totalPageview=60
11/10/06 08:48:37 INFO examples.DBCountPageView: sumPageview=0
java.lang.RuntimeException: Evaluation was not correct!
at 
org.apache.hadoop.examples.DBCountPageView.run(DBCountPageView.java:439)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
at 
org.apache.hadoop.examples.DBCountPageView.main(DBCountPageView.java:452)