protected void reduce(TextPair key, Iterable<Text> values, Context context)
throws IOException, InterruptedException {
StringBuilder resutl = new StringBuilder();
for (Text text : values){
resutl.append(text.toString()).append(",");
}
context.write(key, new Text(resutl.toString()));
}
到这步,二度人脉关系基本已经挖掘出来,后续的处理就很简单了,当然也可以基于二度人脉挖掘三度,四度:)