-1

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!

code muncher
  • 1,592
  • 2
  • 27
  • 46

1 Answers1

0

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);
}
banjara
  • 3,800
  • 3
  • 38
  • 61