[
https://issues.apache.org/jira/browse/MAHOUT-764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066664#comment-13066664
]
Hudson commented on MAHOUT-764:
-------------------------------
Integrated in Mahout-Quality #947 (See
[https://builds.apache.org/job/Mahout-Quality/947/])
MAHOUT-764 split getNumUsersWithPreferenceFor() into two methods for
clarity and efficiency
srowen : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1147583
Files :
*
/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/netflix/NetflixDataModel.java
*
/mahout/trunk/integration/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java
*
/mahout/trunk/integration/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/ReloadFromJDBCDataModel.java
*
/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericBooleanPrefDataModel.java
*
/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericDataModel.java
*
/mahout/trunk/integration/src/main/java/org/apache/mahout/cf/taste/impl/model/mongodb/MongoDBDataModel.java
*
/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/model/DataModel.java
*
/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/kddcup/KDDCupDataModel.java
*
/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/PlusAnonymousUserDataModel.java
*
/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java
*
/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/netflix/NetflixFileDataModel.java
> Rationalize DataModel.getNumUsersWithPreferenceFor() API
> --------------------------------------------------------
>
> Key: MAHOUT-764
> URL: https://issues.apache.org/jira/browse/MAHOUT-764
> Project: Mahout
> Issue Type: Improvement
> Components: Collaborative Filtering
> Affects Versions: 0.5
> Reporter: Sean Owen
> Assignee: Sean Owen
> Priority: Minor
> Labels: datamodel, varargs
> Fix For: 0.6
>
> Attachments: MAHOUT-764.patch
>
>
> DataModel has a method getNumUsersWithPreferenceFor(long... itemIDs). It does
> what it says. However I think this is a suboptimal API (for which we have me
> to blame).
> - All calls to this involve 1 or 2 arguments only
> - No implementation supports more than 2 arguments, which makes the signature
> misleading
> - All implementations internally have some logic like "if it's 1, do X, if
> it's args, do Y, otherwise fail"
> - Calling this method, which happens frequently, always incurs the overhead
> of allocating a long[]
> The change is simple: make this two methods, with one and two args
> respectively. Implementations would then just split their current
> implementation into these two methods.
> There is no API change for callers, at all, if invoked with 1 or 2 args. I
> assume callers are not trying 3+ args now, as it has never been supported.
> It does involve a straightforward change to implementors of DataModel.
> Open for comment?
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira