资 源 简 介
public class KmeansMapper extends MapReduceBase implements
Mapper {
// one coodinate(data)
private List coordinate = new ArrayList();
private BasicKMeansTool basicKmeans = new BasicKMeansTool();
public void map(LongWritable key, Text value,
OutputCollector midoutput,
Reporter arg3) throws IOException {
// TODO Auto-generated method stub
String line = value.toString();
String[] dataList = line.split(",");
List distances = null;
StringTokenizer itr;
for (int i = 0; i < dataList.length; i++) {
itr = new StringTokenizer(dataList[i]);
&nbs