mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject svn commit: r986582 - in /mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop: item/RecommenderJob.java similarity/item/ItemSimilarityJob.java
Date Wed, 18 Aug 2010 07:10:28 GMT
Author: ssc
Date: Wed Aug 18 07:10:28 2010
New Revision: 986582

URL: http://svn.apache.org/viewvc?rev=986582&view=rev
Log:
MAHOUT-473 add parameter -Dmapred.reduce.tasks when call job RowSimilarityJob in RecommenderJob

Modified:
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/RecommenderJob.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/ItemSimilarityJob.java

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/RecommenderJob.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/RecommenderJob.java?rev=986582&r1=986581&r2=986582&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/RecommenderJob.java
(original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/RecommenderJob.java
Wed Aug 18 07:10:28 2010
@@ -196,10 +196,13 @@ public final class RecommenderJob extend
       /* Once DistributedRowMatrix uses the hadoop 0.20 API, we should refactor this call
to something like
        * new DistributedRowMatrix(...).rowSimilarity(...) */
       try {
-        RowSimilarityJob.main(new String[] { "-Dmapred.input.dir=" + itemUserMatrixPath.toString(),
-            "-Dmapred.output.dir=" + similarityMatrixPath.toString(), "--numberOfColumns",
-            String.valueOf(numberOfUsers), "--similarityClassname", similarityClassname,
"--maxSimilaritiesPerRow",
-            String.valueOf(maxSimilaritiesPerItem + 1), "--tempDir", tempDirPath.toString()
});
+        ToolRunner.run(getConf(), new RowSimilarityJob(), new String[] {
+            "-Dmapred.input.dir=" + itemUserMatrixPath.toString(),
+            "-Dmapred.output.dir=" + similarityMatrixPath.toString(),
+            "--numberOfColumns", String.valueOf(numberOfUsers),
+            "--similarityClassname", similarityClassname,
+            "--maxSimilaritiesPerRow", String.valueOf(maxSimilaritiesPerItem + 1),
+            "--tempDir", tempDirPath.toString() });
       } catch (Exception e) {
         throw new IllegalStateException("item-item-similarity computation failed", e);
       }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/ItemSimilarityJob.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/ItemSimilarityJob.java?rev=986582&r1=986581&r2=986582&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/ItemSimilarityJob.java
(original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/ItemSimilarityJob.java
Wed Aug 18 07:10:28 2010
@@ -177,10 +177,13 @@ public final class ItemSimilarityJob ext
 
     /* Once DistributedRowMatrix uses the hadoop 0.20 API, we should refactor this call to
something like
      * new DistributedRowMatrix(...).rowSimilarity(...) */
-    RowSimilarityJob.main(new String[] { "-Dmapred.input.dir=" + itemUserMatrixPath.toString(),
-        "-Dmapred.output.dir=" + similarityMatrixPath.toString(), "--numberOfColumns", String.valueOf(numberOfUsers),
-        "--similarityClassname", similarityClassName, "--maxSimilaritiesPerRow",
-        String.valueOf(maxSimilarItemsPerItem + 1), "--tempDir", tempDirPath.toString() });
+    ToolRunner.run(getConf(), new RowSimilarityJob(), new String[] {
+        "-Dmapred.input.dir=" + itemUserMatrixPath.toString(),
+        "-Dmapred.output.dir=" + similarityMatrixPath.toString(),
+        "--numberOfColumns", String.valueOf(numberOfUsers),
+        "--similarityClassname", similarityClassName,
+        "--maxSimilaritiesPerRow", String.valueOf(maxSimilarItemsPerItem + 1),
+        "--tempDir", tempDirPath.toString() });
 
     if (shouldRunNextPhase(parsedArgs, currentPhase)) {
       Job mostSimilarItems = prepareJob(similarityMatrixPath,



Mime
View raw message