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

2014-11-22 Thread Ashok Harnal
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 $reommend

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

2014-11-22 Thread Andrew Musselman
Please upgrade to Mahout version 0.9, as many things have been fixed since. > On Nov 22, 2014, at 7:00 PM, Ashok Harnal 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 -

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

2014-11-23 Thread Ashok Harnal
I upgraded to mahout 0.9. The same error persists. Here is the full dump. Incidentally, I am using local file system and not hadoop. [ashokharnal@master ~]$ mahout recommendfactorized --input /user/ashokharnal/seqfiles --userFeatures $res_out_file/U/ --itemFeatures $res_out_file/M/ --numRecommen

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

2014-11-23 Thread Andrew Musselman
Can you paste a sample of your input data? The exception is this: ava.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) > On Nov 23, 2014, at 4:31 AM, Ashok Harnal

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

2014-11-24 Thread Divyang Shah
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 wrote: I use mahout 0.7 installed in Cloudera. After creating user-feature and item-feature

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

2014-11-24 Thread Ashok Harnal
Thanks for reply. Here are the facts: 1. I am using mahout shell command and not a java program. So I am not passing any arguments to map function. 2. I am using hadoop. Input training file is loaded in hadoop. It is a tab separated 'u1.base' file of MovieLens dataset. It is something like b

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

2014-11-24 Thread jayunit100
Looks like maybe a mismatch between mahout version you compiled code against and the mahout version installed in the cluster? > On Nov 24, 2014, at 8:08 AM, Ashok Harnal wrote: > > Thanks for reply. Here are the facts: > > 1. I am using mahout shell command and not a java program. So I am not

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

2014-11-24 Thread Ashok Harnal
Thanks for reply. I did not compile mahout. Mahout 0.9 comes along with Cloudera 5.2. Ashok Kumar Harnal On 24 November 2014 at 18:42, wrote: > Looks like maybe a mismatch between mahout version you compiled code > against and the mahout version installed in the cluster? > > > On Nov 24, 2014,

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

2014-11-24 Thread Ted Dunning
The error message that you got indicated that some input was textual and needed to be an integer. Is there a chance that the type of some of your input is incorrect in your sequence files? On Mon, Nov 24, 2014 at 3:47 PM, Ashok Harnal wrote: > Thanks for reply. I did not compile mahout. Mahou

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

2014-11-24 Thread Ashok Harnal
Thanks for the reply. I will recheck and repeat the experiment using self-typed input. I am reinstalling Cloudera 5.2. Ashok Kumar Harnal On 24 November 2014 at 21:38, Ted Dunning wrote: > The error message that you got indicated that some input was textual and > needed to be an integer. > > Is

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

2014-11-25 Thread Ashok Harnal
I have now tested on a fresh cluster of Cloudera 5.2. Mahout 0.9 comes installed with it. My input data is just five lines, tab-separated. I have typed this data myself. So I do not expect anything else in this data. 11001 12005 14001 22002 23001 I use the

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

2014-11-25 Thread Gokhan Capan
The problem is that seqdirectory doesn't do what you want. From the documentation page: The output of seqDirectory will be a Sequence file < Text, Text > of all documents (/sub-directory-path/documentFileName, documentText). Please see http://mahout.apache.org/users/basics/creating-vectors-from-t

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

2014-11-25 Thread Ashok Harnal
Thank you for the reply. I proceeded as per the Example listed in Apache Mahout help page at this link : https://mahout.apache.org/users/recommender/intro-als-hadoop.html As per Step 4 of this link, after creation of sequence fil

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

2014-11-25 Thread Gokhan Capan
If I don't miss it, the documentation in the link doesn't say anything about using seqdirectory. I don't remember how it works in 0.7, but it basically says: Given a file of lines of , 1- run mahout parallelALS 2- run mahout recommendfactorized The input file for the 2nd step is the output of the

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

2014-11-25 Thread Ashok Harnal
Well, I have tried again. The Mahout documentation at this link ( https://mahout.apache.org/users/recommender/intro-als-hadoop.html ) says that once user and item features have been obtained, we proceed as follows: 1. For users we now want to make recommendations, we list them in a sequence file f