You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Drew Farris (JIRA)" <ji...@apache.org> on 2010/05/29 05:44:36 UTC
[jira] Created: (MAHOUT-404) AbstractJob improvements.
AbstractJob improvements.
-------------------------
Key: MAHOUT-404
URL: https://issues.apache.org/jira/browse/MAHOUT-404
Project: Mahout
Issue Type: Improvement
Components: Utils
Affects Versions: 0.4
Reporter: Drew Farris
Per discussion : http://lucene.472066.n3.nabble.com/Re-input-now-Dmapred-input-dir-td852297.html#a852297
With the advent of the parsedArgs map returned by AbstractJob.parseArguments is there
a need to pass Option arguments around anymore? Could AbstractJob maintain
Options state in a sense?
For example, from RecommenderJob:
{code}
Option numReccomendationsOpt = AbstractJob.buildOption("numRecommendations", "n",
"Number of recommendations per user", "10");
Option usersFileOpt = AbstractJob.buildOption("usersFile", "u",
"File of users to recommend for", null);
Option booleanDataOpt = AbstractJob.buildOption("booleanData", "b",
"Treat input as without pref values", Boolean.FALSE.toString());
Map<String,String> parsedArgs = AbstractJob.parseArguments(
args, numReccomendationsOpt, usersFileOpt, booleanDataOpt);
if (parsedArgs == null) {
return -1;
}
{code}
Could be changed to something like:
{code}
buildOption("numRecommendations", "n", "Number of recommendations per user",
"10");
buildOption("usersFile", "u", "File of users to recommend for", null);
buildOption("booleanData", "b", "Treat input as without pref values",
Boolean.FALSE.toString());
Map<String,String> parsedArgs = parseArguments();
{code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (MAHOUT-404) AbstractJob improvements.
Posted by "Drew Farris (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Drew Farris updated MAHOUT-404:
-------------------------------
Attachment: MAHOUT-404.patch
This captures the idea in patch form. Haven't done any testing with it yet.
> AbstractJob improvements.
> -------------------------
>
> Key: MAHOUT-404
> URL: https://issues.apache.org/jira/browse/MAHOUT-404
> Project: Mahout
> Issue Type: Improvement
> Components: Utils
> Affects Versions: 0.4
> Reporter: Drew Farris
> Attachments: MAHOUT-404.patch
>
>
> Per discussion : http://lucene.472066.n3.nabble.com/Re-input-now-Dmapred-input-dir-td852297.html#a852297
> With the advent of the parsedArgs map returned by AbstractJob.parseArguments is there
> a need to pass Option arguments around anymore? Could AbstractJob maintain
> Options state in a sense?
> For example, from RecommenderJob:
> {code}
> Option numReccomendationsOpt = AbstractJob.buildOption("numRecommendations", "n",
> "Number of recommendations per user", "10");
> Option usersFileOpt = AbstractJob.buildOption("usersFile", "u",
> "File of users to recommend for", null);
> Option booleanDataOpt = AbstractJob.buildOption("booleanData", "b",
> "Treat input as without pref values", Boolean.FALSE.toString());
> Map<String,String> parsedArgs = AbstractJob.parseArguments(
> args, numReccomendationsOpt, usersFileOpt, booleanDataOpt);
> if (parsedArgs == null) {
> return -1;
> }
> {code}
> Could be changed to something like:
> {code}
> buildOption("numRecommendations", "n", "Number of recommendations per user",
> "10");
> buildOption("usersFile", "u", "File of users to recommend for", null);
> buildOption("booleanData", "b", "Treat input as without pref values",
> Boolean.FALSE.toString());
> Map<String,String> parsedArgs = parseArguments();
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MAHOUT-404) AbstractJob improvements.
Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873657#action_12873657 ]
Sean Owen commented on MAHOUT-404:
----------------------------------
I'm into the idea -- make changes like this as you see fit, as far as I'm concerned.
> AbstractJob improvements.
> -------------------------
>
> Key: MAHOUT-404
> URL: https://issues.apache.org/jira/browse/MAHOUT-404
> Project: Mahout
> Issue Type: Improvement
> Components: Utils
> Affects Versions: 0.4
> Reporter: Drew Farris
> Attachments: MAHOUT-404.patch
>
>
> Per discussion : http://lucene.472066.n3.nabble.com/Re-input-now-Dmapred-input-dir-td852297.html#a852297
> With the advent of the parsedArgs map returned by AbstractJob.parseArguments is there
> a need to pass Option arguments around anymore? Could AbstractJob maintain
> Options state in a sense?
> For example, from RecommenderJob:
> {code}
> Option numReccomendationsOpt = AbstractJob.buildOption("numRecommendations", "n",
> "Number of recommendations per user", "10");
> Option usersFileOpt = AbstractJob.buildOption("usersFile", "u",
> "File of users to recommend for", null);
> Option booleanDataOpt = AbstractJob.buildOption("booleanData", "b",
> "Treat input as without pref values", Boolean.FALSE.toString());
> Map<String,String> parsedArgs = AbstractJob.parseArguments(
> args, numReccomendationsOpt, usersFileOpt, booleanDataOpt);
> if (parsedArgs == null) {
> return -1;
> }
> {code}
> Could be changed to something like:
> {code}
> buildOption("numRecommendations", "n", "Number of recommendations per user",
> "10");
> buildOption("usersFile", "u", "File of users to recommend for", null);
> buildOption("booleanData", "b", "Treat input as without pref values",
> Boolean.FALSE.toString());
> Map<String,String> parsedArgs = parseArguments();
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.