Return-Path: Delivered-To: apmail-lucene-mahout-user-archive@minotaur.apache.org Received: (qmail 53165 invoked from network); 15 May 2009 16:07:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 May 2009 16:07:11 -0000 Received: (qmail 88445 invoked by uid 500); 15 May 2009 16:07:10 -0000 Delivered-To: apmail-lucene-mahout-user-archive@lucene.apache.org Received: (qmail 88414 invoked by uid 500); 15 May 2009 16:07:10 -0000 Mailing-List: contact mahout-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mahout-user@lucene.apache.org Delivered-To: mailing list mahout-user@lucene.apache.org Received: (qmail 88404 invoked by uid 99); 15 May 2009 16:07:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2009 16:07:10 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Adam.Burnett@idearc.com designates 151.138.253.25 as permitted sender) Received: from [151.138.253.25] (HELO dfw2w2ssmtp6.idearc.com) (151.138.253.25) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2009 16:07:00 +0000 Received: from dfw2w2smail8.na1.vis.verizon.com ([158.95.223.63]) by dfw2w2ssmtp6.idearc.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 15 May 2009 11:00:58 -0500 Received: from mid1w2smail1.na1.vis.verizon.com ([167.241.45.21]) by dfw2w2smail8.na1.vis.verizon.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 15 May 2009 11:06:39 -0500 X-MIMEOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Getting started Date: Fri, 15 May 2009 12:06:37 -0400 Message-ID: <2D397C4478FC2844B46F929D1ADEB2C103BFC856@mid1w2smail1.na1.vis.verizon.com> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Getting started Thread-index: AcnUshub2uawp9ruSLybmlea2h8AYQAw+F9w References: <2D397C4478FC2844B46F929D1ADEB2C103BFC78C@mid1w2smail1.na1.vis.verizon.com> From: "Burnett, Adam" To: "Sean Owen" , X-OriginalArrivalTime: 15 May 2009 16:06:39.0695 (UTC) FILETIME=[2184DDF0:01C9D577] X-Virus-Checked: Checked by ClamAV on apache.org I'm running into another stack trace once I switched to using an = OracleDataSource. AbstractJDBCDataModel is setting the fetch direction = to FETCH_UNKNOWN which causes the ResultSet.isLast() call to fail. I = think using TYPE_SCROLL_INSENSITIVE as the direction should resolve this = issue. Do you think it makes sense to change this in the abstract data = model class or is this a special case that requires a custom = OracleJDBCDataModel? Here's the trace: java.sql.SQLException: Invalid operation for forward only resultset : = isLast at = oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:7= 0) at = oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131) at = oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:197= ) at = oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:261= ) at = oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:269= ) at = oracle.jdbc.driver.OracleResultSetImpl.isLast(OracleResultSetImpl.java:36= 8) at = org.apache.mahout.cf.taste.impl.model.jdbc.AbstractJDBCDataModel$ResultSe= tUserIterator.hasNext(AbstractJDBCDataModel.java:577) at = org.apache.mahout.cf.taste.impl.recommender.TopItems.getTopUsers(TopItems= .java:81) at = org.apache.mahout.cf.taste.impl.neighborhood.NearestNUserNeighborhood.get= UserNeighborhood(NearestNUserNeighborhood.java:102) at = org.apache.mahout.cf.taste.impl.recommender.GenericUserBasedRecommender.r= ecommend(GenericUserBasedRecommender.java:83) at = org.apache.mahout.cf.taste.impl.recommender.AbstractRecommender.recommend= (AbstractRecommender.java:53) at = org.apache.mahout.cf.taste.impl.recommender.CachingRecommender$Recommenda= tionRetriever.get(CachingRecommender.java:198) at = org.apache.mahout.cf.taste.impl.recommender.CachingRecommender$Recommenda= tionRetriever.get(CachingRecommender.java:185) at = org.apache.mahout.cf.taste.impl.common.Cache.getAndCacheValue(Cache.java:= 103) at org.apache.mahout.cf.taste.impl.common.Cache.get(Cache.java:77) at = org.apache.mahout.cf.taste.impl.recommender.CachingRecommender.recommend(= CachingRecommender.java:123) at = org.apache.mahout.cf.taste.impl.recommender.CachingRecommender.recommend(= CachingRecommender.java:99) -Adam=20 -Adam -----Original Message----- From: Sean Owen [mailto:srowen@gmail.com]=20 Sent: Thursday, May 14, 2009 11:29 AM To: mahout-user@lucene.apache.org; Burnett, Adam Subject: Re: Getting started That's my bad. I just committed a fix that makes the result of these methods in RandomUtils more reasonable for small values and should fix this corner-ish case. The org.apache.mahout.cf.taste stuff itself does not require Hadoop; the Hadoop bindings are all in org.apache.mahout.cf.taste.hadoop. 2009/5/14 Burnett, Adam : > Hello Mahout community. =A0I'm just getting started in exploring how = to > integrate Mahout into my application. I've written a quick sample but > I'm getting the following exception when trying to use the > SlopeOneRecommender. > > INFO: Building average diffs... > Exception in thread "main" java.lang.IllegalArgumentException > =A0 =A0 =A0 =A0at > = org.apache.mahout.cf.taste.impl.common.RandomUtils.isNotPrime(RandomUtil > s.java:93) > =A0 =A0 =A0 =A0at > = org.apache.mahout.cf.taste.impl.common.RandomUtils.nextPrime(RandomUtils > .java:81) > =A0 =A0 =A0 =A0at > = org.apache.mahout.cf.taste.impl.common.RandomUtils.nextTwinPrime(RandomU > tils.java:67) > =A0 =A0 =A0 =A0at > = org.apache.mahout.cf.taste.impl.common.FastMap.rehash(FastMap.java:285) > =A0 =A0 =A0 =A0at > = org.apache.mahout.cf.taste.impl.recommender.slopeone.MemoryDiffStorage.p > runeInconsequentialDiffs(MemoryDiffStorage.java:254) > =A0 =A0 =A0 =A0at > = org.apache.mahout.cf.taste.impl.recommender.slopeone.MemoryDiffStorage.b > uildAverageDiffs(MemoryDiffStorage.java:227) > =A0 =A0 =A0 =A0at > = org.apache.mahout.cf.taste.impl.recommender.slopeone.MemoryDiffStorage.< > init>(MemoryDiffStorage.java:119) > =A0 =A0 =A0 =A0at > = org.apache.mahout.cf.taste.impl.recommender.slopeone.SlopeOneRecommender > .(SlopeOneRecommender.java:65) > > I built Mahout from the 774566 revision of the trunk. =A0I have a > MySQLJDBCDataModel that reads a custom table from my database. =A0One > question I have is do I have to have the hadoop cluster running before > attempting to use Mahout in my app? =A0Could not having it running = cause > the above error? =A0Any thoughts in how to proceed from here? = =A0Thanks! > > Adam Burnett > > >