}
@Override
public void attachOutputs(Map<String, LogicalOutput> outputs,
Configuration conf) throws ExecException {
LogicalOutput output = outputs.get(tuplesOutputKey);
if (output == null) {
throw new ExecException("Output to vertex " + tuplesOutputKey + " is missing");
}
try {
tuplesWriter = (KeyValueWriter) output.getWriter();
LOG.info("Attached output to vertex " + tuplesOutputKey + " : output=" + output + ", writer=" + tuplesWriter);
} catch (Exception e) {
throw new ExecException(e);
}
output = outputs.get(statsOutputKey);
if (output == null) {
throw new ExecException("Output to vertex " + statsOutputKey + " is missing");
}
try {
statsWriter = (KeyValueWriter) output.getWriter();
LOG.info("Attached output to vertex " + statsOutputKey + " : output=" + output + ", writer=" + statsWriter);
} catch (Exception e) {
throw new ExecException(e);
}
}