Project

General

Profile

« Previous | Next » 

Revision 48805

Added by Eri Katsari almost 7 years ago

Final update- fixed distance algs, added props un wf

View differences:

DatasetReducer.java
12 12

  
13 13
public class DatasetReducer extends Reducer<Text, Text, Text, Text> {
14 14
    public static enum ENTITIES_COUNTER {
15

  
16 15
        TOTAL_ENTITIES,
17 16
    }
18 17

  
......
30 29
    protected void reduce(final Text key, final Iterable<Text> values, final Context context) throws IOException, InterruptedException {
31 30
        Iterator<Text> it = values.iterator();
32 31
        StringBuffer value = new StringBuffer();
33

  
34 32
        String[] tmp = key.toString().split(",");
35 33
        String dataset = tmp[0].replaceAll("[^a-zA-Z0-9]", "");
36 34
        String entityType = tmp[1].replaceAll("[^a-zA-Z0-9]", "");

Also available in: Unified diff