mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject svn commit: r1434865 - /mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/als/DatasetSplitter.java
Date Thu, 17 Jan 2013 19:02:22 GMT
Author: ssc
Date: Thu Jan 17 19:02:22 2013
New Revision: 1434865

URL: http://svn.apache.org/viewvc?rev=1434865&view=rev
Log:
MAHOUT-1125 DatasetSplitter.run doesn't parseArguments before getOption so throws and exception
always

Modified:
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/als/DatasetSplitter.java

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/als/DatasetSplitter.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/als/DatasetSplitter.java?rev=1434865&r1=1434864&r2=1434865&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/als/DatasetSplitter.java
(original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/als/DatasetSplitter.java
Thu Jan 17 19:02:22 2013
@@ -32,6 +32,8 @@ import org.apache.mahout.common.Abstract
 import org.apache.mahout.common.RandomUtils;
 
 import java.io.IOException;
+import java.util.List;
+import java.util.Map;
 import java.util.Random;
 
 /**
@@ -72,6 +74,11 @@ public class DatasetSplitter extends Abs
     addOption("probePercentage", "p", "percentage of the data to use as probe set (default:
" 
         + DEFAULT_PROBE_PERCENTAGE + ')', String.valueOf(DEFAULT_PROBE_PERCENTAGE));
 
+    Map<String,List<String>> parsedArgs = parseArguments(args);
+    if (parsedArgs == null) {
+      return -1;
+    }
+
     double trainingPercentage = Double.parseDouble(getOption("trainingPercentage"));
     double probePercentage = Double.parseDouble(getOption("probePercentage"));
     String tempDir = getOption("tempDir");



Mime
View raw message