/** * This method takes the clustered points output by the clustering algorithms as input and writes them into * their respective clusters. */ public void process() throws IOException { createPostProcessDirectory(); for (Pair<?, WeightedVectorWritable> record : new SequenceFileDirIterable<Writable, WeightedVectorWritable>(clusteredPoints, PathType.GLOB, PathFilters.partFilter(), null, false, conf)) { String clusterId = record.getFirst().toString().trim(); putVectorInRespectiveCluster(clusterId, record.getSecond()); } IOUtils.close(writersForClusters.values()); writersForClusters.clear(); }
/** * This method takes the clustered points output by the clustering algorithms as input and writes them into * their respective clusters. */ public void process() throws IOException { createPostProcessDirectory(); for (Pair<?, WeightedVectorWritable> record : new SequenceFileDirIterable<Writable, WeightedVectorWritable>(clusteredPoints, PathType.GLOB, PathFilters.partFilter(), null, false, conf)) { String clusterId = record.getFirst().toString().trim(); putVectorInRespectiveCluster(clusterId, record.getSecond()); } IOUtils.close(writersForClusters.values()); writersForClusters.clear(); }
/** * This method takes the clustered points output by the clustering algorithms as input and writes them into * their respective clusters. */ public void process() throws IOException { createPostProcessDirectory(); for (Pair<?, WeightedVectorWritable> record : new SequenceFileDirIterable<Writable, WeightedVectorWritable>(clusteredPoints, PathType.GLOB, PathFilters.partFilter(), null, false, conf)) { String clusterId = record.getFirst().toString().trim(); putVectorInRespectiveCluster(clusterId, record.getSecond()); } IOUtils.close(writersForClusters.values()); writersForClusters.clear(); }