[ 
https://issues.apache.org/jira/browse/MAHOUT-1261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13835094#comment-13835094
 ] 

Hudson commented on MAHOUT-1261:
--------------------------------

SUCCESS: Integrated in Mahout-Quality #2338 (See 
[https://builds.apache.org/job/Mahout-Quality/2338/])
MAHOUT-1261: TasteHadoopUtils.idToIndex can return an int that has size 
Integer.MAX_VALUE (smarthi: rev 1546379)
* /mahout/trunk/CHANGELOG
* 
/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/TasteHadoopUtils.java
* 
/mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/hadoop/TasteHadoopUtilsTest.java


> TasteHadoopUtils.idToIndex can return an int that has size Integer.MAX_VALUE
> ----------------------------------------------------------------------------
>
>                 Key: MAHOUT-1261
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-1261
>             Project: Mahout
>          Issue Type: Bug
>          Components: Collaborative Filtering
>    Affects Versions: 0.8
>            Reporter: Dan Filimon
>            Assignee: Sebastian Schelter
>            Priority: Minor
>             Fix For: 0.9
>
>         Attachments: MAHOUT-1261.patch
>
>
> I'm running ItemSimilarityJob on a very large (~600M by 4B) matrix that's 
> very sparse (total set of associations is 630MB).
> The job fails because of an IndexException in ToUserVectorsReducer.
> TasteHadoopUtils.idToIndex(long id) hashes a long with:
> 0x7fffffff & Longs.hashCode(id) (line 
> o.a.m.cf.taste.hadoop.TasteHadoopUtils:57).
> For some id (I don't know what value), the result returned is 
> Integer.MAX_VALUE.
> This cannot be set in the userVector because the cardinality of that is also 
> Integer.MAX_VALUE and it throws an exception.
> So, the issue is that values from 0 to INT_MAX are returned by idToIndex but 
> the vector only has 0 to INT_MAX - 1 possible entries.
> It's a nasty little off-by-one bug.
> I'm thinking of just % size when setting.
> [~ssc] & everyone else, thoughts? :)



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to