log.debug("< ({}, {})", key, value);
String[] v = value.toString().split("\\|");
long id = Long.parseLong(v[0]);
if ( v[1].equals("S") ) {
if ( s != -1l ) EventManager.send(counters, new Event(Constants.eventDuplicate, null));
s = id;
}
if ( v[1].equals("P") ) p = id;
if ( v[1].equals("O") ) o = id;
if ( v[1].equals("G") ) g = id;
}
if ( ( g != -1l ) && ( s != -1l ) && ( p != -1l ) && ( o != -1l ) ) {
outputKey.set(s, p, o, g);
EventManager.send(counters, new Event(Constants.eventQuad, null));
context.write(outputKey, outputValue);
log.debug("> ({}, {})", outputKey, outputValue);
} else if ( ( s != -1l ) && ( p != -1l ) && ( o != -1l ) ) {
outputKey.set(s, p, o);
EventManager.send(counters, new Event(Constants.eventTriple, null));
context.write(outputKey, outputValue);
log.debug("> ({}, {})", outputKey, outputValue);
} else {
EventManager.send(counters, new Event(Constants.eventMalformed, null));
log.warn("WARNING: unexpected values for key {}", key );
}
outputKey.clear();
}