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:
* <ol>
* <li>The input [EMAIL PROTECTED] org.apache.hadoop.fs.Path} where the
input documents live</li>
- * <li>The output [EMAIL PROTECTED] org.apache.hadoop.fs.Path} where to
write the [EMAIL PROTECTED] org.apache.mahout.classifier.bayes.Model} as a
[EMAIL PROTECTED] org.apache.hadoop.io.SequenceFile}</li>
+ * <li>The output [EMAIL PROTECTED] org.apache.hadoop.fs.Path} where to
write the [EMAIL PROTECTED] org.apache.mahout.classifier.bayes.BayesModel} as a
[EMAIL PROTECTED] org.apache.hadoop.io.SequenceFile}</li>
* </ol>
* @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);