Revision 46871
Added by Sandro La Bruzzo almost 7 years ago
DedupBuildRootsReducer.java | ||
---|---|---|
25 | 25 |
|
26 | 26 |
public class DedupBuildRootsReducer extends TableReducer<Text, ImmutableBytesWritable, ImmutableBytesWritable> { |
27 | 27 |
|
28 |
private DedupConfig dedupConf; |
|
29 |
private Ontologies ontologies; |
|
28 |
public static final String FIXED_RELATION = "Fixed Relation"; |
|
29 |
private DedupConfig dedupConf; |
|
30 |
private Ontologies ontologies; |
|
30 | 31 |
|
31 | 32 |
@Override |
32 | 33 |
protected void setup(final Context context) throws IOException, InterruptedException { |
... | ... | |
109 | 110 |
final byte[] revKey = Bytes.toBytes(decoder.relSourceId()); |
110 | 111 |
context.write(new ImmutableBytesWritable(revKey), asPutByCollectedFrom(decoder.getDNGF())); |
111 | 112 |
|
112 |
context.getCounter(decoder.getRelDescriptor().shortQualifier(), "[entity <-> root]").increment(2);
|
|
113 |
}
|
|
114 |
// mark relation from the related entities to the duplicate as deleted
|
|
113 |
context.getCounter(FIXED_RELATION, decoder.getRelDescriptor().shortQualifier() + " [entity <-> root]").increment(2);
|
|
114 |
}
|
|
115 |
// mark relation from the related entities to the duplicate as deleted
|
|
115 | 116 |
DNGFDecoder decoder = markDeleted(rel, true, context); |
116 | 117 |
byte[] revKey = Bytes.toBytes(decoder.relSourceId()); |
117 | 118 |
context.write(new ImmutableBytesWritable(revKey), asPut(decoder.getDNGF())); |
... | ... | |
121 | 122 |
revKey = Bytes.toBytes(decoder.relSourceId()); |
122 | 123 |
context.write(new ImmutableBytesWritable(revKey), asPut(decoder.getDNGF())); |
123 | 124 |
|
124 |
context.getCounter(decoder.getRelDescriptor().shortQualifier(), "mark deleted [dup <-> entity]").increment(2);
|
|
125 |
}
|
|
125 |
context.getCounter(FIXED_RELATION, decoder.getRelDescriptor().shortQualifier() + " mark deleted [dup <-> entity]").increment(2);
|
|
126 |
}
|
|
126 | 127 |
|
127 | 128 |
public boolean checkHack(final String root, final DNGF oaf) { |
128 | 129 |
|
Also available in: Unified diff