Here is part of my MapReduce routine:
private static class Reducer ... {
Text maxWord;
private void reduce ... {
some code to find the maximum word occurence;
}
private void combine ... {
context.write(maxWord, ...);
}
}
Somehow this works differently if I switch the type of the member variable maxWord
from Text
to String
(also making a change context.write(new Text(maxWord))
in the combiner. What is the reason for this behaviour?