How to emit in the close method of Reducer

后端 未结 1 835
臣服心动
臣服心动 2021-01-20 18:31

The close method inherited from MapReduceBase has no argument:

public void close()

So I don\'t have OutputC

相关标签:
1条回答
  • 2021-01-20 19:04

    It is unfortunate you are using the old API. The new API has a cleanup method (complements setup).

    I wonder if Hadoop will let you cheat and store the OutputCollector in a private data member in your Reducer class, then refer to that in the close method. I'm guessing you can't, but it might be worth a try.

    0 讨论(0)
提交回复
热议问题