Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
实际上,我的 reducer 键是自定义键 (word1, word2) ,我想以 "word1\tword2" 之类的格式编写输出。而我无法做到这一点。
任何帮助表示赞赏。
谢谢。
编辑:一对之间已经有 \t ......我没有注意到它!
你遇到什么错误试试这个
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); }