Yes, that was a strange problem earlier, since it was a *method of
Hadoop* that referenced this non-existent method. I suspect you have
two version of Hadoop in the classpath somehow, in two different
classloaders -- that's my first guess. But, it seems like you solved
that problem.

The problem you see below is one I encounter as well with Hadoop
0.20.x -- unfortunately I am pretty sure it is a Hadoop problem, and I
do not know of any fix. See in the stack trace how the new "mapreduce"
classes call into the old "mapred" classes? and the old classes won't
accept a new Hadoop class like SequenceFileOutputFormat.

On Thu, Oct 29, 2009 at 7:42 AM, feng zhou <[email protected]> wrote:
> sorry, i have found this method in the javadoc of hadoop0.20.1,
> but i met a new problem when i run the same example
>
> r...@master:/home/zhoufeng/newdisk/hadoop-0.20.1# bin/hadoop jar
> /home/zhoufeng/newdisk/result/trunk/core/target/mahout-core-0.3-SNAPSHOT.job
> org.apache.mahout.cf.taste.hadoop.SlopeOnePrefsToDiffsJob -i r.txt -o output
> 09/10/29 15:37:06 WARN mapred.JobClient: Use GenericOptionsParser for
> parsing the arguments. Applications should implement Tool for the same.
> 09/10/29 15:37:06 WARN mapred.JobClient: No job jar file set.  User classes
> may not be found. See JobConf(Class) or JobConf#setJar(String).
> Exception in thread "main" java.lang.RuntimeException:
> java.lang.RuntimeException: class
> org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat not
> org.apache.hadoop.mapred.OutputFormat
>  at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:840)
>  at org.apache.hadoop.mapred.JobConf.getOutputFormat(JobConf.java:422)
>  at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:772)
>  at org.apache.hadoop.mapreduce.Job.submit(Job.java:432)
>  at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:447)
>  at
> org.apache.mahout.cf.taste.hadoop.SlopeOnePrefsToDiffsJob.main(SlopeOnePrefsToDiffsJob.java:86)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:597)
>  at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: java.lang.RuntimeException: class
> org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat not
> org.apache.hadoop.mapred.OutputFormat
>  at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:834)
>  ... 10 more
> Which version of hadoop should I choose? thanks
>

Reply via email to