mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Divyang Shah <divyangas...@yahoo.com.INVALID>
Subject Re: Mahout 0.7 ALS Recommender: java.lang.Exception: java.lang.RuntimeException: java.lang.ClassCastException: org.apache.hadoop.io.Text cannot be cast to org.apache.hadoop.io.IntWritable
Date Mon, 24 Nov 2014 10:20:39 GMT
hello,        problem is in map method argument you have passed is not matching with
specified in job configuration. so, match both of them.
 

     On Sunday, 23 November 2014 8:31 AM, Ashok Harnal <ashokharnal@gmail.com> wrote:
   

 I use mahout 0.7 installed in Cloudera. After creating user-feature and
item-feature matrix in hdfs, I run the following command:

 mahout recommendfactorized --input /user/ashokharnal/seqfiles
--userFeatures $res_out_file/U/ --itemFeatures $res_out_file/M/
--numRecommendations 1 --output $reommendation --maxRating 1

After some time, I get the following error:

:
:
14/11/23 08:28:20 INFO mapred.LocalJobRunner: Map task executor complete.
14/11/23 08:28:20 WARN mapred.LocalJobRunner: job_local954305987_0001
java.lang.Exception: java.lang.RuntimeException:
java.lang.ClassCastException: org.apache.hadoop.io.Text cannot be cast to
org.apache.hadoop.io.IntWritable
    at
org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:406)
Caused by: java.lang.RuntimeException: java.lang.ClassCastException:
org.apache.hadoop.io.Text cannot be cast to org.apache.hadoop.io.IntWritable
    at
org.apache.hadoop.mapreduce.lib.map.MultithreadedMapper.run(MultithreadedMapper.java:151)
    at
org.apache.mahout.cf.taste.hadoop.als.MultithreadedSharingMapper.run(MultithreadedSharingMapper.java:60)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:672)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:330)
    at
org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:268)
    at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.ClassCastException: org.apache.hadoop.io.Text cannot
be cast to org.apache.hadoop.io.IntWritable
    at
org.apache.mahout.cf.taste.hadoop.als.PredictionMapper.map(PredictionMapper.java:44)
    at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:140)
    at
org.apache.hadoop.mapreduce.lib.map.MultithreadedMapper$MapRunner.run(MultithreadedMapper.java:268)


Not sure what is wrong.
Request help.

Ashok Kumar Harnal




-- 
Visit my blog at: http://ashokharnal.wordpress.com/


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