I just read the file and write it on disk. Its pretty easy.

 FileStatus[] partFiles = getAllClusteredPointPartFiles();
    for (FileStatus partFile : partFiles) {
      SequenceFile.Reader clusteredPointsReader = new 
SequenceFile.Reader(fileSystem, partFile.getPath(),
          conf);
      WritableComparable clusterIdAsKey = (WritableComparable) 
clusteredPointsReader.getKeyClass()
          .newInstance();
      Writable vector = (Writable) 
clusteredPointsReader.getValueClass().newInstance();
      while (clusteredPointsReader.next(clusterIdAsKey, vector)) {
        //use clusterId and vector here

      }

      clusteredPointsReader.close();
      closeWriters();
    }

  }


Paritosh


On 25-11-2011 12:06, Rachana wrote:
Hi all,

I am new to Mahout.
I have successfully run kmeans in mahout using Synthetic Control Data.
I wish to see the mapping information present in clusteredPoints
directory.
Is there any way to extract the data present in clusteredPoints
directory to Text file
(as we do for the clusters directory  using clusterdump tool)?

Anyhelp is appreciated.

Thank you,
Rachana



-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1411 / Virus Database: 2092/4037 - Release Date: 11/24/11

Reply via email to