You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Dan Cartoon (JIRA)" <ji...@apache.org> on 2012/07/04 06:57:33 UTC

[jira] [Updated] (MAHOUT-1039) org.apache.mahout.cf.taste.hadoop.pseudo.RecommenderJob throws IllegalArgumentException when no usersFile is supplied

     [ https://issues.apache.org/jira/browse/MAHOUT-1039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Cartoon updated MAHOUT-1039:
--------------------------------

    Fix Version/s: 0.8
           Status: Patch Available  (was: Open)

Patch to fix IllegalArgumentException
                
> org.apache.mahout.cf.taste.hadoop.pseudo.RecommenderJob throws IllegalArgumentException when no usersFile is supplied
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: MAHOUT-1039
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-1039
>             Project: Mahout
>          Issue Type: Bug
>          Components: Collaborative Filtering
>            Reporter: Dan Cartoon
>            Assignee: Sean Owen
>             Fix For: 0.8
>
>         Attachments: MAHOUT-1039.diff
>
>
> When trying to run the pseudo.RecommenderJob without a usersFile, there is an IllegalArgumentException:
> Exception in thread "main" java.lang.IllegalArgumentException: Can not create a Path from a null string
>         at org.apache.hadoop.fs.Path.checkPathArg(Path.java:78)
>         at org.apache.hadoop.fs.Path.<init>(Path.java:90)
>         at org.apache.mahout.cf.taste.hadoop.pseudo.RecommenderJob.run(RecommenderJob.java:122)
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
>         at org.apache.mahout.cf.taste.hadoop.pseudo.RecommenderJob.main(RecommenderJob.java:148)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> In addition, providing a usersFile does not appear to cause any filtering to occur.  This can be reproduced running the pseudo.RecommenderJob without a userFile and some basic preferences(I'm happy to provide more specifics here if necessary)
> 		
> It looks like we're taking the wrong action based on this check at RecommenderJob.java:122
> Path usersFile = hasOption("usersFile") ? inputFile : new Path(getOption("usersFile"));
> If the usersFile option has been specified, it seems like we should be using that, rather than the inputFile, and vice versa.
> I have attached attached a patch, runnable from trunk that swaps the action on line 122.  This appears to fix the issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira