mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r950980 - in /mahout/trunk: core/src/main/java/org/apache/mahout/classifier/bayes/ core/src/main/java/org/apache/mahout/common/ core/src/main/java/org/apache/mahout/math/hadoop/ examples/src/main/java/org/apache/mahout/text/ utils/src/main/...
Date Thu, 03 Jun 2010 12:55:20 GMT
Author: drew
Date: Thu Jun  3 12:55:20 2010
New Revision: 950980

URL: http://svn.apache.org/viewvc?rev=950980&view=rev
Log:
MAHOUT-408: Mahout CLI OptionExeptions with given "-h" or "--help" fix from Shannon Quinn

Modified:
    mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/TrainClassifier.java
    mahout/trunk/core/src/main/java/org/apache/mahout/common/AbstractJob.java
    mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TransposeJob.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/text/WikipediaToSequenceFile.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/text/SequenceFilesFromDirectory.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/text/SparseVectorsFromSequenceFiles.java

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/TrainClassifier.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/TrainClassifier.java?rev=950980&r1=950979&r2=950980&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/TrainClassifier.java
(original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/TrainClassifier.java
Thu Jun  3 12:55:20 2010
@@ -98,6 +98,7 @@ public final class TrainClassifier {
       Parser parser = new Parser();
       
       parser.setGroup(group);
+      parser.setHelpOption(helpOpt);
       CommandLine cmdLine = parser.parse(args);
       if (cmdLine.hasOption(helpOpt)) {
         CommandLineUtil.printHelp(group);

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/common/AbstractJob.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/common/AbstractJob.java?rev=950980&r1=950979&r2=950980&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/common/AbstractJob.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/common/AbstractJob.java Thu Jun  3 12:55:20
2010
@@ -128,6 +128,7 @@ public abstract class AbstractJob extend
     try {
       Parser parser = new Parser();
       parser.setGroup(group);
+      parser.setHelpOption(helpOpt);
       cmdLine = parser.parse(args);
     } catch (OptionException e) {
       log.error(e.getMessage());

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TransposeJob.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TransposeJob.java?rev=950980&r1=950979&r2=950980&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TransposeJob.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TransposeJob.java Thu Jun
 3 12:55:20 2010
@@ -62,6 +62,10 @@ public class TransposeJob extends Abstra
                                     "nc",
                                     "Number of columns of the input matrix");
     Map<String,String> parsedArgs = parseArguments(strings, numRowsOpt, numColsOpt);
+    if (parsedArgs == null) {
+      // FIXME
+      return 0;
+    }
 
     Configuration originalConf = getConf();
     String inputPathString = originalConf.get("mapred.input.dir");

Modified: mahout/trunk/examples/src/main/java/org/apache/mahout/text/WikipediaToSequenceFile.java
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/src/main/java/org/apache/mahout/text/WikipediaToSequenceFile.java?rev=950980&r1=950979&r2=950980&view=diff
==============================================================================
--- mahout/trunk/examples/src/main/java/org/apache/mahout/text/WikipediaToSequenceFile.java
(original)
+++ mahout/trunk/examples/src/main/java/org/apache/mahout/text/WikipediaToSequenceFile.java
Thu Jun  3 12:55:20 2010
@@ -99,6 +99,7 @@ public final class WikipediaToSequenceFi
     
     Parser parser = new Parser();
     parser.setGroup(group);
+    parser.setHelpOption(helpOpt);
     try {
       CommandLine cmdLine = parser.parse(args);
       if (cmdLine.hasOption(helpOpt)) {

Modified: mahout/trunk/utils/src/main/java/org/apache/mahout/text/SequenceFilesFromDirectory.java
URL: http://svn.apache.org/viewvc/mahout/trunk/utils/src/main/java/org/apache/mahout/text/SequenceFilesFromDirectory.java?rev=950980&r1=950979&r2=950980&view=diff
==============================================================================
--- mahout/trunk/utils/src/main/java/org/apache/mahout/text/SequenceFilesFromDirectory.java
(original)
+++ mahout/trunk/utils/src/main/java/org/apache/mahout/text/SequenceFilesFromDirectory.java
Thu Jun  3 12:55:20 2010
@@ -183,6 +183,7 @@ public final class SequenceFilesFromDire
     try {
       Parser parser = new Parser();
       parser.setGroup(group);
+      parser.setHelpOption(helpOpt);
       CommandLine cmdLine = parser.parse(args);
       if (cmdLine.hasOption(helpOpt)) {
         CommandLineUtil.printHelp(group);

Modified: mahout/trunk/utils/src/main/java/org/apache/mahout/text/SparseVectorsFromSequenceFiles.java
URL: http://svn.apache.org/viewvc/mahout/trunk/utils/src/main/java/org/apache/mahout/text/SparseVectorsFromSequenceFiles.java?rev=950980&r1=950979&r2=950980&view=diff
==============================================================================
--- mahout/trunk/utils/src/main/java/org/apache/mahout/text/SparseVectorsFromSequenceFiles.java
(original)
+++ mahout/trunk/utils/src/main/java/org/apache/mahout/text/SparseVectorsFromSequenceFiles.java
Thu Jun  3 12:55:20 2010
@@ -120,6 +120,7 @@ public final class SparseVectorsFromSequ
     try {
       Parser parser = new Parser();
       parser.setGroup(group);
+      parser.setHelpOption(helpOpt);
       CommandLine cmdLine = parser.parse(args);
       
       if (cmdLine.hasOption(helpOpt)) {



Mime
View raw message