mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksander Sadecki <>
Subject How to list all vectors from a cluster
Date Thu, 22 May 2014 15:22:17 GMT

Thank you very much!

I am trying to implement a Java function with this class.

I wrote this piece of code:

		ClusterDumper dumper = new ClusterDumper(new Path(partMDir), new Path(

		Map<Integer, List<WeightedPropertyVectorWritable>> dumped = dumper

		for (Integer numberOfList : dumped.keySet()) {
			List<WeightedPropertyVectorWritable> listWithVectors = dumped

			for (WeightedPropertyVectorWritable vec : listWithVectors) {

when I run it, I have got an exception.

Constructor takes 2 parameters:

ClusterDumper(seqFileDir, pointsDir) and I do not know which files should I pass here...

I have got 9 files:

		String s1 = root + "";
		String s2 = root + "synthetic_control.seq";
		String s3 = root + ".synthetic_control.seq.crc";
		String s4 = outputDir + "\\clusteredPoints\\part-m-0";
		String s5 = outputDir + "\\clusteredPoints\\.part-m-0.crc";
		String s6 = outputDir + "\\clusters-0-final\\_policy";
		String s7 = outputDir + "\\clusters-0-final\\part-r-00000";
		String s8 = outputDir + "\\clusters-0-final\\._policy.crc";
		String s9 = outputDir + "\\clusters-0-final\\.part-r-00000.crc";

		Path p1 = new Path(s1);
		Path p2 = new Path(s2);
		Path p3 = new Path(s3);
		Path p4 = new Path(s4);
		Path p5 = new Path(s5);
		Path p6 = new Path(s6);
		Path p7 = new Path(s7);
		Path p8 = new Path(s8);
		Path p9 = new Path(s9);

I tried to find which 2 should I use but nothing works.

Some of them gives me: not a SequenceFile

another one: cannot be cast to

or sometimes there is no excpetion but output is empty.

Could you help me?

Thank you in advance

View raw message