You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by jm...@apache.org on 2010/01/21 23:50:37 UTC

svn commit: r901907 - /lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/lucene/Driver.java

Author: jmannix
Date: Thu Jan 21 22:50:36 2010
New Revision: 901907

URL: http://svn.apache.org/viewvc?rev=901907&view=rev
Log:
Switch to VectorWritable, which handles any type of Vector.
Fixes MAHOUT-265

Modified:
    lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/lucene/Driver.java

Modified: lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/lucene/Driver.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/lucene/Driver.java?rev=901907&r1=901906&r2=901907&view=diff
==============================================================================
--- lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/lucene/Driver.java (original)
+++ lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/lucene/Driver.java Thu Jan 21 22:50:36 2010
@@ -35,6 +35,7 @@
 import org.apache.lucene.store.FSDirectory;
 import org.apache.mahout.math.RandomAccessSparseVector;
 import org.apache.mahout.common.CommandLineUtil;
+import org.apache.mahout.math.VectorWritable;
 import org.apache.mahout.utils.vectors.TF;
 import org.apache.mahout.utils.vectors.TFIDF;
 import org.apache.mahout.utils.vectors.TermInfo;
@@ -223,7 +224,7 @@
     Configuration conf = new Configuration();
     FileSystem fs = FileSystem.get(conf);
     //TODO: Make this parameter driven
-    SequenceFile.Writer seqWriter = SequenceFile.createWriter(fs, conf, path, LongWritable.class, RandomAccessSparseVector.class);
+    SequenceFile.Writer seqWriter = SequenceFile.createWriter(fs, conf, path, LongWritable.class, VectorWritable.class);
 
     return new SequenceFileVectorWriter(seqWriter);
   }