How to pull data in the Map/Reduce functions?

前端 未结 1 684
甜味超标
甜味超标 2020-12-17 00:43

According to the Hadoop : The Definitive Guide.

The new API supports both a “push” and a “pull” style of iteration. In both APIs, key-value record pai

相关标签:
1条回答
  • 2020-12-17 01:06

    I posted a query @ mapreduce-user@hadoop.apache.org and got the answer.

    The next key value pair can be retrieved from the context object which is passed to the map, by calling nextKeyValue() on it. So you will be able to pull the next data from it in the new API.

    Is the performance of pull better than push in this scenario? Also, what are the scenarios in which the pull will be useful?

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