manipulating iterator in mapreduce

前端 未结 4 1488
死守一世寂寞
死守一世寂寞 2020-12-15 01:43

I am trying to find the sum of any given points using hadoop, The issue I am having is on getting all values from a given key in a single reducer. It looks like this.

<
4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-15 02:13

    To copy Iterator, you can't assign the iterator to a new variable. You should "clone" a iterator to a new variable of iterator class. When the iterator A assign an other iterator variable B, the two variables of iterator are pointed the same data.

提交回复
热议问题