Actually my key to reducer is custom key (word1, word2) and I want to write output, in format like "word1\tword2" . And I'm not able to do that.
Any help appreciated.
Thanks.
EDIT: there was already \t between pair... I didn't notice it!
Actually my key to reducer is custom key (word1, word2) and I want to write output, in format like "word1\tword2" . And I'm not able to do that.
Any help appreciated.
Thanks.
EDIT: there was already \t between pair... I didn't notice it!
what error are you getting try this
public void reduce(Text key, Iterable<IntWritable> values,Context context)
throws IOException, InterruptedException {
CustomKey customkey = (CustomKey) key;
context.write(new Text(customkey.word1+"/"+customkey.word2), result);
}