Team,
While reading the sequencial file . it is returning null
These are the command which i executed.
For Converting the Sequence File to Chunk(sequence vector) :
raghu@Syed:/media/Work/mahout$ bin/mahout seqdirectory -i
/media/Work/mahout/examples/bin/sample/fileList -o
/media/Work/mahout/examples/bin/sample/seq-ve
ctor -c UTF-8 -chunk 5
For Converting the Chunk(sequence vector) to sparse :
raghu@Syed:/media/Work/mahout$ bin/mahout seq2sparse -i
/media/Work/mahout/examples/bin/sample/seq-vector/ -o
/media/Work/mahout/examples/bin/sample/sparse
For Converting the sparse to Cluster :
raghu@Syed:/media/Work/mahout$ bin/mahout kmeans -i
/media/Work/mahout/examples/bin/sample/sparse/tfidf-vectors/ -c
/media/Work/mahout/examples/bin/sample/clusterData/ -o
/media/Work/mahout/examples/bin/sample/clusers -x 10 -k 20 -ow
For Converting the Cluster to clusterdump :
raghu@Syed:/media/Work/mahout$ bin/mahout clusterdump -s
/media/Work/mahout/examples/bin/sample/clusers/clusters-10 -d
/media/Work/mahout/examples/bin/sample/sparse/dictionary.file-0 -dt
sequencefile -b 100 n 20
To get the documents which belong to cluster i wrote these code
Configuration conf =new Configuration()
Path path1=n*ew* Path("/media/Work/mahout/examples/bin/sample/clusterData/
part-randomSeed");
FileSystem fs = FileSystem.*get*(path1.toUri(),conf);
SequenceFile.Reader reader = *new* SequenceFile.Reader(fs,path1, conf);
IntWritable key = *new* IntWritable();
WeightedVectorWritable value = *new* WeightedVectorWritable();
*while* (reader.next(key, value))
{
System.*out*.println(value.toString() + " belongs to cluster "+
key.toString());
}
reader.close();
But it is returning null .
Please help me to move further .
Thanks and Regards,
S SYED ABDUL KATHER