You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Divya <di...@k2associates.com.sg> on 2010/10/29 09:23:42 UTC
Vector Dumper error
Hi,
I am able to dump vector for tfidf-vectors, tf-vectors files
Which gets generated during SparseVectorsFromSequenceFiles.
I am getting following error when I try to generate vectors from
Wordcount (files generated during SparseVectorsFromSequenceFiles )
Error -
Exception in thread "main" java.lang.ClassCastException:
org.apache.hadoop.io.LongWritable cannot be cast to
org.apache.mahout.math.VectorWritable
at
org.apache.mahout.utils.vectors.VectorDumper.main(VectorDumper.java:144)
tokenized-documents (files generated during SparseVectorsFromSequenceFiles )
Error -
Exception in thread "main" java.lang.ClassCastException:
org.apache.mahout.common.StringTuple cannot be cast to
org.apache.mahout.math.VectorWritable
at
org.apache.mahout.utils.vectors.VectorDumper.main(VectorDumper.java:144)
df-count (files generated during SparseVectorsFromSequenceFiles )
Error -
Exception in thread "main" java.lang.ClassCastException:
org.apache.hadoop.io.LongWritable cannot be cast to
org.apache.mahout.math.VectorWritable
at
org.apache.mahout.utils.vectors.VectorDumper.main(VectorDumper.java:144)
dictionary.file-0 (files generated during SparseVectorsFromSequenceFiles )
Error -
Exception in thread "main" java.lang.ClassCastException:
org.apache.hadoop.io.IntWritable cannot be cast to
org.apache.mahout.math.VectorWritable
at
org.apache.mahout.utils.vectors.VectorDumper.main(VectorDumper.java:144)
What am I doing wrong here ?
Regards,
Divya
Re: Vector Dumper error
Posted by Grant Ingersoll <gs...@apache.org>.
What commands/code are you running? It looks to me like the Key simply for the file you are looking at isn't what you expect it to be. Also, have a look at the SequenceFileDumper, that is a more general purpose view of Seq. Files.
(also, no need to send to both lists. All the devs are on this list and this is a usage question at this point)
On Oct 29, 2010, at 3:23 AM, Divya wrote:
> Hi,
>
>
>
> I am able to dump vector for tfidf-vectors, tf-vectors files
>
> Which gets generated during SparseVectorsFromSequenceFiles.
>
>
>
> I am getting following error when I try to generate vectors from
>
>
>
>
>
> Wordcount (files generated during SparseVectorsFromSequenceFiles )
>
>
>
> Error -
>
> Exception in thread "main" java.lang.ClassCastException:
> org.apache.hadoop.io.LongWritable cannot be cast to
> org.apache.mahout.math.VectorWritable
>
> at
> org.apache.mahout.utils.vectors.VectorDumper.main(VectorDumper.java:144)
>
>
>
>
>
>
>
> tokenized-documents (files generated during SparseVectorsFromSequenceFiles )
>
>
>
> Error -
>
>
>
> Exception in thread "main" java.lang.ClassCastException:
> org.apache.mahout.common.StringTuple cannot be cast to
> org.apache.mahout.math.VectorWritable
>
> at
> org.apache.mahout.utils.vectors.VectorDumper.main(VectorDumper.java:144)
>
>
>
>
>
>
>
>
>
> df-count (files generated during SparseVectorsFromSequenceFiles )
>
>
>
> Error -
>
>
>
> Exception in thread "main" java.lang.ClassCastException:
> org.apache.hadoop.io.LongWritable cannot be cast to
> org.apache.mahout.math.VectorWritable
>
> at
> org.apache.mahout.utils.vectors.VectorDumper.main(VectorDumper.java:144)
>
>
>
>
>
>
>
> dictionary.file-0 (files generated during SparseVectorsFromSequenceFiles )
>
>
>
> Error -
>
>
>
> Exception in thread "main" java.lang.ClassCastException:
> org.apache.hadoop.io.IntWritable cannot be cast to
> org.apache.mahout.math.VectorWritable
>
> at
> org.apache.mahout.utils.vectors.VectorDumper.main(VectorDumper.java:144)
>
>
>
>
>
>
>
> What am I doing wrong here ?
>
>
>
>
>
> Regards,
>
> Divya
>
>
>
>
>
--------------------------
Grant Ingersoll
http://www.lucidimagination.com