mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robina...@apache.org
Subject svn commit: r1345772 - in /mahout/trunk: bin/mahout core/src/main/java/org/apache/mahout/driver/MahoutDriver.java
Date Sun, 03 Jun 2012 20:32:43 GMT
Author: robinanil
Date: Sun Jun  3 20:32:43 2012
New Revision: 1345772

URL: http://svn.apache.org/viewvc?rev=1345772&view=rev
Log:
MAHOUT-1006 Increase default heapsize to 4G and create deprecation warnings for old naivebayes

Modified:
    mahout/trunk/bin/mahout
    mahout/trunk/core/src/main/java/org/apache/mahout/driver/MahoutDriver.java

Modified: mahout/trunk/bin/mahout
URL: http://svn.apache.org/viewvc/mahout/trunk/bin/mahout?rev=1345772&r1=1345771&r2=1345772&view=diff
==============================================================================
--- mahout/trunk/bin/mahout (original)
+++ mahout/trunk/bin/mahout Sun Jun  3 20:32:43 2012
@@ -95,7 +95,7 @@ if [ "$JAVA_HOME" = "" ]; then
 fi
 
 JAVA=$JAVA_HOME/bin/java
-JAVA_HEAP_MAX=-Xmx1000m 
+JAVA_HEAP_MAX=-Xmx4g 
 
 # check envvars which might override default args
 if [ "$MAHOUT_HEAPSIZE" != "" ]; then

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/driver/MahoutDriver.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/driver/MahoutDriver.java?rev=1345772&r1=1345771&r2=1345772&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/driver/MahoutDriver.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/driver/MahoutDriver.java Sun Jun  3
20:32:43 2012
@@ -109,6 +109,13 @@ public final class MahoutDriver {
       if (args.length > 0 && shortName(mainClasses.getProperty(keyString)).equals(args[0]))
{
         foundShortName = true;
       }
+      if (args.length > 0 && keyString.equalsIgnoreCase(args[0]) && isDeprecated(mainClasses,
keyString)) {
+        log.error(desc(mainClasses.getProperty(keyString)));
+        return;
+      }
+      if (isDeprecated(mainClasses, keyString)) {
+        continue;
+      }
       addClass(programDriver, keyString, mainClasses.getProperty(keyString));
     }
 
@@ -192,6 +199,10 @@ public final class MahoutDriver {
     }
   }
 
+  private static boolean isDeprecated(Properties mainClasses, String keyString) {
+    return shortName(mainClasses.getProperty(keyString)).equalsIgnoreCase("deprecated");
+  }
+
   private static Properties loadProperties(String resource) throws IOException {
     InputStream propsStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(resource);
     if (propsStream != null) {



Mime
View raw message