Return-Path: Delivered-To: apmail-lucene-mahout-commits-archive@locus.apache.org Received: (qmail 41720 invoked from network); 21 Aug 2008 15:34:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Aug 2008 15:34:23 -0000 Received: (qmail 67520 invoked by uid 500); 21 Aug 2008 15:34:21 -0000 Delivered-To: apmail-lucene-mahout-commits-archive@lucene.apache.org Received: (qmail 67461 invoked by uid 500); 21 Aug 2008 15:34:21 -0000 Mailing-List: contact mahout-commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mahout-dev@lucene.apache.org Delivered-To: mailing list mahout-commits@lucene.apache.org Received: (qmail 67451 invoked by uid 99); 21 Aug 2008 15:34:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Aug 2008 08:34:21 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Aug 2008 15:33:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 658C32388961; Thu, 21 Aug 2008 08:34:02 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r687782 - in /lucene/mahout/trunk: core/src/main/java/org/apache/mahout/classifier/bayes/common/BayesFeatureDriver.java examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreatorDriver.java Date: Thu, 21 Aug 2008 15:34:02 -0000 To: mahout-commits@lucene.apache.org From: kalle@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080821153402.658C32388961@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kalle Date: Thu Aug 21 08:34:01 2008 New Revision: 687782 URL: http://svn.apache.org/viewvc?rev=687782&view=rev Log: Updated use of depricated Configurable setInputPath and setOutputPath Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/common/BayesFeatureDriver.java lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreatorDriver.java Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/common/BayesFeatureDriver.java URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/common/BayesFeatureDriver.java?rev=687782&r1=687781&r2=687782&view=diff ============================================================================== --- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/common/BayesFeatureDriver.java (original) +++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/common/BayesFeatureDriver.java Thu Aug 21 08:34:01 2008 @@ -16,9 +16,7 @@ * limitations under the License. */ -import org.apache.hadoop.mapred.JobClient; -import org.apache.hadoop.mapred.JobConf; -import org.apache.hadoop.mapred.KeyValueTextInputFormat; +import org.apache.hadoop.mapred.*; import org.apache.hadoop.io.DefaultStringifier; import org.apache.hadoop.io.Text; import org.apache.hadoop.io.FloatWritable; @@ -61,10 +59,12 @@ conf.setOutputKeyClass(Text.class); conf.setOutputValueClass(FloatWritable.class); - - conf.setInputPath(new Path(input)); + + //conf.setInputPath(new Path(input)); + FileInputFormat.setInputPaths(conf, new Path(input)); Path outPath = new Path(output); - conf.setOutputPath(outPath); + //conf.setOutputPath(outPath); + FileOutputFormat.setOutputPath(conf, outPath); conf.setNumMapTasks(100); //conf.setNumReduceTasks(1); conf.setMapperClass(BayesFeatureMapper.class); Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreatorDriver.java URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreatorDriver.java?rev=687782&r1=687781&r2=687782&view=diff ============================================================================== --- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreatorDriver.java (original) +++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/WikipediaDatasetCreatorDriver.java Thu Aug 21 08:34:01 2008 @@ -38,7 +38,7 @@ * Takes in two arguments: *
    *
  1. The input {@link org.apache.hadoop.fs.Path} where the input documents live
  2. - *
  3. The output {@link org.apache.hadoop.fs.Path} where to write the {@link org.apache.mahout.classifier.bayes.Model} as a {@link org.apache.hadoop.io.SequenceFile}
  4. + *
  5. The output {@link org.apache.hadoop.fs.Path} where to write the {@link org.apache.mahout.classifier.bayes.BayesModel} as a {@link org.apache.hadoop.io.SequenceFile}
  6. *
* @param args The args */ @@ -68,9 +68,11 @@ conf.setOutputKeyClass(Text.class); conf.setOutputValueClass(Text.class); - conf.setInputPath(new Path(input)); +// conf.setInputPath(new Path(input)); + FileInputFormat.setInputPaths(conf, new Path(input)); Path outPath = new Path(output); - conf.setOutputPath(outPath); +// conf.setOutputPath(outPath); + FileOutputFormat.setOutputPath(conf, outPath); conf.setMapperClass(WikipediaDatasetCreatorMapper.class); conf.setNumMapTasks(100);