Hello there! I'm trying to get Taste to work on the 10M dataset but, even
following some tips from Sean on Mahout in Action, I can't get it working
using SlopeOneRecommender and JDBC.
The machine I run the examples is a Core 2 Duo 2.8 Ghz with 4GB RAM Ubuntu
9.10 64bit JDK 1.6
The Mysql is set to use up to 512MB of table cache
The JVM is running with Xmx=2048mb
I'm using spring to make things simpler but bottom line I create a slopeone
recommender using the constructor:
DataModel:JDBCDataModel
weighting:Weighted
weighting:Weighted
diffStorage:memory
The memory storage is configured:
DataModel:JDBCDataModel
weighting:Weighted
compact:false
maxEntries:100000
Running the code I get this exception:
Caused by: java.lang.NullPointerException
at com.mysql.jdbc.ResultSetImpl.getLong(ResultSetImpl.java:2843)
at com.mysql.jdbc.ResultSetImpl.getLong(ResultSetImpl.java:2830)
at
org.apache.commons.dbcp.DelegatingResultSet.getLong(DelegatingResultSet.java:190)
at
org.apache.mahout.cf.taste.impl.model.jdbc.AbstractJDBCDataModel.getLongColumn(AbstractJDBCDataModel.java:602)
at
org.apache.mahout.cf.taste.impl.model.jdbc.AbstractJDBCDataModel$ResultSetIDIterator.nextLong(AbstractJDBCDataModel.java:677)
at
org.apache.mahout.cf.taste.impl.recommender.slopeone.MemoryDiffStorage.buildAverageDiffs(MemoryDiffStorage.java:221)
at
org.apache.mahout.cf.taste.impl.recommender.slopeone.MemoryDiffStorage.<init>(MemoryDiffStorage.java:115)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
... 57 more
I tried to replace the MemoryDiff by a JDBCDiff. After almost 1 hour running
the code, and 100% CPU usage by my mysql process. I decided to quit, is it
supposed to take so long?
I tried to change the maxEntries to a smaller value but the NullPointer
always happens. My table is not exactly like the one used as sample on the
source code, but I do inform the correct columns and they are of the same
type.
Any ideas?
--
The intuitive mind is a sacred gift and the
rational mind is a faithful servant. We have
created a society that honors the servant and
has forgotten the gift.