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/11/03 08:38:57 UTC
IndexOutOfBoundsException in Kmeans
Hi,
I have an input file in XML format
I am successfully able to convert it into Sequence file and then to vectors
But when I am trying to run Kmeans
Getting error - Exception in thread "main"
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
$ bin/mahout kmeans -i D:/MahoutResult/Exalead/seq2sparse/tfidf-vectors -o
D:/MahoutResult/Exalead/Kmeans -c D:/MahoutResult/Exalead
/Kmeans -k 10 -x 20 -ow -cl
Running on hadoop, using HADOOP_HOME=C:\cygwin\home\Divya\hadoop-0.20.2
HADOOP_CONF_DIR=C:\cygwin\home\Divya\hadoop-0.20.2\conf
10/11/03 15:35:30 INFO common.AbstractJob: Command line arguments:
{--clustering=null, --clusters=D:/MahoutResult/Exalead/Kmeans, --con
vergenceDelta=0.5,
--distanceMeasure=org.apache.mahout.common.distance.SquaredEuclideanDistance
Measure, --endPhase=2147483647, --input=
D:/MahoutResult/Exalead/seq2sparse/tfidf-vectors, --maxIter=20,
--method=mapreduce, --numClusters=10, --output=D:/MahoutResult/Exalead/
Kmeans, --overwrite=null, --startPhase=0, --tempDir=temp}
10/11/03 15:35:30 INFO common.HadoopUtil: Deleting
D:/MahoutResult/Exalead/Kmeans
10/11/03 15:35:30 WARN util.NativeCodeLoader: Unable to load native-hadoop
library for your platform... using builtin-java classes wher
e applicable
10/11/03 15:35:30 INFO compress.CodecPool: Got brand-new compressor
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1,
Size: 1
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at
org.apache.mahout.clustering.kmeans.RandomSeedGenerator.buildRandom(RandomSe
edGenerator.java:107)
at
org.apache.mahout.clustering.kmeans.KMeansDriver.run(KMeansDriver.java:96)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at
org.apache.mahout.clustering.kmeans.KMeansDriver.main(KMeansDriver.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver
.java:68)
at
org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:184)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Regards,
Divya