inUnion = false;
}
Preconditions.checkArgument(getOutputs().size() == (inUnion ? 2 : 1));
Preconditions.checkArgument(getOutputs().containsKey("checker"));
MRInput input = (MRInput) getInputs().values().iterator().next();
KeyValueReader kvReader = input.getReader();
Output output = getOutputs().get("checker");
KeyValueWriter kvWriter = (KeyValueWriter) output.getWriter();
MROutput parts = null;
KeyValueWriter partsWriter = null;
if (inUnion) {
parts = (MROutput) getOutputs().get("parts");
partsWriter = parts.getWriter();
}
while (kvReader.next()) {
StringTokenizer itr = new StringTokenizer(kvReader.getCurrentValue().toString());
while (itr.hasMoreTokens()) {
word.set(itr.nextToken());
kvWriter.write(word, one);
if (inUnion) {
partsWriter.write(word, one);